Class: Google::Apis::GamesConfigurationV1configuration::GamesConfigurationService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/games_configuration_v1configuration/service.rb

Overview

Google Play Game Services Publishing API

The Google Play Game Services Publishing API allows developers to configure their games in Game Services.

Examples:

require 'google/apis/games_configuration_v1configuration'

GamesConfiguration = Google::Apis::GamesConfigurationV1configuration # Alias the module
service = GamesConfiguration::GamesConfigurationService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGamesConfigurationService

Returns a new instance of GamesConfigurationService.



46
47
48
49
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 46

def initialize
  super('https://gamesconfiguration.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 39

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



44
45
46
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#delete_achievement_configuration(achievement_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete the achievement configuration with the given ID.

Parameters:

  • achievement_id (String)

    The ID of the achievement used by this method.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



71
72
73
74
75
76
77
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 71

def delete_achievement_configuration(achievement_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'games/v1configuration/achievements/{achievementId}', options)
  command.params['achievementId'] = achievement_id unless achievement_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete the leaderboard configuration with the given ID.

Parameters:

  • leaderboard_id (String)

    The ID of the leaderboard.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



276
277
278
279
280
281
282
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 276

def delete_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'games/v1configuration/leaderboards/{leaderboardId}', options)
  command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_achievement_configuration(achievement_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration

Retrieves the metadata of the achievement configuration with the given ID.

Parameters:

  • achievement_id (String)

    The ID of the achievement used by this method.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



99
100
101
102
103
104
105
106
107
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 99

def get_achievement_configuration(achievement_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'games/v1configuration/achievements/{achievementId}', options)
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration
  command.params['achievementId'] = achievement_id unless achievement_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration

Retrieves the metadata of the leaderboard configuration with the given ID.

Parameters:

  • leaderboard_id (String)

    The ID of the leaderboard.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



304
305
306
307
308
309
310
311
312
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 304

def get_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'games/v1configuration/leaderboards/{leaderboardId}', options)
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration
  command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_achievement_configuration(application_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration

Insert a new achievement configuration in this application.

Parameters:

  • application_id (String)

    The application ID from the Google Play developer console.

  • achievement_configuration_object (Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



130
131
132
133
134
135
136
137
138
139
140
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 130

def insert_achievement_configuration(application_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'games/v1configuration/applications/{applicationId}/achievements', options)
  command.request_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation
  command.request_object = achievement_configuration_object
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration
  command.params['applicationId'] = application_id unless application_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_leaderboard_configuration(application_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration

Insert a new leaderboard configuration in this application.

Parameters:

  • application_id (String)

    The application ID from the Google Play developer console.

  • leaderboard_configuration_object (Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



335
336
337
338
339
340
341
342
343
344
345
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 335

def insert_leaderboard_configuration(application_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'games/v1configuration/applications/{applicationId}/leaderboards', options)
  command.request_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation
  command.request_object = leaderboard_configuration_object
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration
  command.params['applicationId'] = application_id unless application_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_achievement_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse

Returns a list of the achievement configurations in this application.

Parameters:

  • application_id (String)

    The application ID from the Google Play developer console.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults.

  • page_token (String) (defaults to: nil)

    The token returned by the previous request.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



168
169
170
171
172
173
174
175
176
177
178
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 168

def list_achievement_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'games/v1configuration/applications/{applicationId}/achievements', options)
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse
  command.params['applicationId'] = application_id unless application_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_leaderboard_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse

Returns a list of the leaderboard configurations in this application.

Parameters:

  • application_id (String)

    The application ID from the Google Play developer console.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults.

  • page_token (String) (defaults to: nil)

    The token returned by the previous request.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



373
374
375
376
377
378
379
380
381
382
383
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 373

def list_leaderboard_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'games/v1configuration/applications/{applicationId}/leaderboards', options)
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse
  command.params['applicationId'] = application_id unless application_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_achievement_configuration(achievement_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration

Update the metadata of the achievement configuration with the given ID.

Parameters:

  • achievement_id (String)

    The ID of the achievement used by this method.

  • achievement_configuration_object (Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



201
202
203
204
205
206
207
208
209
210
211
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 201

def update_achievement_configuration(achievement_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'games/v1configuration/achievements/{achievementId}', options)
  command.request_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation
  command.request_object = achievement_configuration_object
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration
  command.params['achievementId'] = achievement_id unless achievement_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_leaderboard_configuration(leaderboard_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration

Update the metadata of the leaderboard configuration with the given ID.

Parameters:

  • leaderboard_id (String)

    The ID of the leaderboard.

  • leaderboard_configuration_object (Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



406
407
408
409
410
411
412
413
414
415
416
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 406

def update_leaderboard_configuration(leaderboard_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'games/v1configuration/leaderboards/{leaderboardId}', options)
  command.request_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation
  command.request_object = leaderboard_configuration_object
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration
  command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#upload_image_configuration(resource_id, image_type, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesConfigurationV1configuration::ImageConfiguration

Uploads an image for a resource with the given ID and image type.

Parameters:

  • resource_id (String)

    The ID of the resource used by this method.

  • image_type (String)

    Selects which image in a resource for this method.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • upload_source (IO, String) (defaults to: nil)

    IO stream or filename containing content to upload

  • content_type (String) (defaults to: nil)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'generated/google/apis/games_configuration_v1configuration/service.rb', line 239

def upload_image_configuration(resource_id, image_type, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command = make_simple_command(:post, 'games/v1configuration/images/{resourceId}/imageType/{imageType}', options)
  else
    command = make_upload_command(:post, 'games/v1configuration/images/{resourceId}/imageType/{imageType}', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.response_representation = Google::Apis::GamesConfigurationV1configuration::ImageConfiguration::Representation
  command.response_class = Google::Apis::GamesConfigurationV1configuration::ImageConfiguration
  command.params['resourceId'] = resource_id unless resource_id.nil?
  command.params['imageType'] = image_type unless image_type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end