Class: Google::Apis::GamesV1::GamesService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::GamesV1::GamesService
- Defined in:
- generated/google/apis/games_v1/service.rb
Overview
Google Play Game Services API
The API for Google Play Game Services.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Cancel a turn-based match.
-
#check_revision(client_revision, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::CheckRevisionResponse
Checks whether the games client is out of date.
-
#create_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Create a room.
-
#create_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Create a turn-based match.
-
#decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Decline an invitation to join a room.
-
#decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Decline an invitation to play a turn-based match.
-
#dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Dismiss an invitation to join a room.
-
#dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Dismiss a turn-based match from the match list.
-
#finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Finish a turn-based match.
-
#get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Application
Retrieves the metadata of the application with the given ID.
-
#get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Leaderboard
Retrieves the metadata of the leaderboard with the given ID.
-
#get_metagame_config(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::MetagameConfig
Return the metagame configuration data for the calling application.
-
#get_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Player
Retrieves the Player resource with the given ID.
-
#get_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Get the data for a room.
-
#get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse
Get high scores, and optionally ranks, in leaderboards for the currently authenticated player.
-
#get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Snapshot
Retrieves the metadata for a given snapshot ID.
-
#get_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Get the data for a turn-based match.
-
#increment_achievement(achievement_id, steps_to_increment, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementIncrementResponse
Increments the steps of the achievement with the given ID for the currently authenticated player.
-
#initialize ⇒ GamesService
constructor
A new instance of GamesService.
-
#join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Join a room.
-
#join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Join a turn-based match.
-
#leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Leave a room.
-
#leave_turn(match_id, match_version, language: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Leave a turn-based match during the current player's turn, without canceling the match.
-
#leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Leave a turn-based match when it is not the current player's turn, without canceling the match.
-
#list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListAchievementDefinitionsResponse
Lists all the achievement definitions for your application.
-
#list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerAchievementResponse
Lists the progress for all your application's achievements for the currently authenticated player.
-
#list_event_by_player(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerEventResponse
Returns a list showing the current progress on events in this application for the currently authenticated user.
-
#list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListEventDefinitionResponse
Returns a list of the event definitions in this application.
-
#list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListLeaderboardResponse
Lists all the leaderboard metadata for your application.
-
#list_metagame_categories_by_player(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListCategoryResponse
List play data aggregated per category for the player corresponding to playerId.
-
#list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerResponse
Get the collection of players for the currently authenticated user.
-
#list_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::RoomList
Returns invitations to join rooms.
-
#list_score_window(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::LeaderboardScores
Lists the scores in a leaderboard around (and including) a player's score.
-
#list_scores(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::LeaderboardScores
Lists the scores in a leaderboard, starting from the top.
-
#list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListSnapshotResponse
Retrieves a list of snapshots created by your application for the player corresponding to the player ID.
-
#list_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchList
Returns turn-based matches the player is or was involved in.
-
#played_application(builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Indicate that the the currently authenticated user is playing your application.
-
#record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::UpdateEventResponse
Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.
-
#rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchRematch
Create a rematch of a match that was previously completed, with the same participants.
-
#remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Removes a push token for the current user and application.
-
#report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::RoomStatus
Updates sent by a client reporting the status of peers in a room.
-
#reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementRevealResponse
Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
-
#set_achievement_steps_at_least(achievement_id, steps, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse
Sets the steps for the currently authenticated player towards unlocking an achievement.
-
#submit_score(leaderboard_id, score, language: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::PlayerScoreResponse
Submits a score to the specified leaderboard.
-
#submit_score_multiple(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerScoreResponse
Submits multiple scores to leaderboards.
-
#sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchSync
Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first.
-
#take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Commit the results of a player turn.
-
#unlock_achievement(achievement_id, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementUnlockResponse
Unlocks this achievement for the currently authenticated player.
-
#update_multiple_achievements(achievement_update_multiple_request_object = nil, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementUpdateMultipleResponse
Updates multiple achievements for the currently authenticated player.
-
#update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Registers a push token for the current user and application.
-
#verify_application(application_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ApplicationVerifyResponse
Verifies the auth token provided with this request is for the application with the specified ID, and returns the ID of the player it was granted for.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ GamesService
Returns a new instance of GamesService.
49 50 51 52 |
# File 'generated/google/apis/games_v1/service.rb', line 49 def initialize super('https://www.googleapis.com/', 'games/v1/') @batch_path = 'batch/games/v1' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/games_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/games_v1/service.rb', line 43 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
47 48 49 |
# File 'generated/google/apis/games_v1/service.rb', line 47 def user_ip @user_ip end |
Instance Method Details
#cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Cancel a turn-based match.
1558 1559 1560 1561 1562 1563 1564 1565 |
# File 'generated/google/apis/games_v1/service.rb', line 1558 def cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/cancel', ) command.params['matchId'] = match_id unless match_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#check_revision(client_revision, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::CheckRevisionResponse
Checks whether the games client is out of date.
886 887 888 889 890 891 892 893 894 895 |
# File 'generated/google/apis/games_v1/service.rb', line 886 def check_revision(client_revision, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'revisions/check', ) command.response_representation = Google::Apis::GamesV1::CheckRevisionResponse::Representation command.response_class = Google::Apis::GamesV1::CheckRevisionResponse command.query['clientRevision'] = client_revision unless client_revision.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
921 922 923 924 925 926 927 928 929 930 931 932 |
# File 'generated/google/apis/games_v1/service.rb', line 921 def create_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/create', ) command.request_representation = Google::Apis::GamesV1::CreateRoomRequest::Representation command.request_object = create_room_request_object command.response_representation = Google::Apis::GamesV1::Room::Representation command.response_class = Google::Apis::GamesV1::Room command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Create a turn-based match.
1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'generated/google/apis/games_v1/service.rb', line 1590 def create_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'turnbasedmatches/create', ) command.request_representation = Google::Apis::GamesV1::CreateTurnBasedMatchRequest::Representation command.request_object = create_turn_based_match_request_object command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
959 960 961 962 963 964 965 966 967 968 969 |
# File 'generated/google/apis/games_v1/service.rb', line 959 def decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/{roomId}/decline', ) command.response_representation = Google::Apis::GamesV1::Room::Representation command.response_class = Google::Apis::GamesV1::Room command.params['roomId'] = room_id unless room_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Decline an invitation to play a turn-based match.
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 |
# File 'generated/google/apis/games_v1/service.rb', line 1627 def decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/decline', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
994 995 996 997 998 999 1000 1001 |
# File 'generated/google/apis/games_v1/service.rb', line 994 def dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/{roomId}/dismiss', ) command.params['roomId'] = room_id unless room_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.
1662 1663 1664 1665 1666 1667 1668 1669 |
# File 'generated/google/apis/games_v1/service.rb', line 1662 def dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/dismiss', ) command.params['matchId'] = match_id unless match_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Finish a turn-based match. Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state.
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 |
# File 'generated/google/apis/games_v1/service.rb', line 1698 def finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/finish', ) command.request_representation = Google::Apis::GamesV1::TurnBasedMatchResults::Representation command.request_object = turn_based_match_results_object command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Application
Retrieves the metadata of the application with the given ID. If the requested application is not available for the specified platformType, the returned response will not include any instance data.
360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'generated/google/apis/games_v1/service.rb', line 360 def get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'applications/{applicationId}', ) command.response_representation = Google::Apis::GamesV1::Application::Representation command.response_class = Google::Apis::GamesV1::Application command.params['applicationId'] = application_id unless application_id.nil? command.query['language'] = language unless language.nil? command.query['platformType'] = platform_type unless platform_type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Leaderboard
Retrieves the metadata of the leaderboard with the given ID.
582 583 584 585 586 587 588 589 590 591 592 |
# File 'generated/google/apis/games_v1/service.rb', line 582 def get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'leaderboards/{leaderboardId}', ) command.response_representation = Google::Apis::GamesV1::Leaderboard::Representation command.response_class = Google::Apis::GamesV1::Leaderboard command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_metagame_config(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::MetagameConfig
Return the metagame configuration data for the calling application.
655 656 657 658 659 660 661 662 663 |
# File 'generated/google/apis/games_v1/service.rb', line 655 def (fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'metagameConfig', ) command.response_representation = Google::Apis::GamesV1::MetagameConfig::Representation command.response_class = Google::Apis::GamesV1::MetagameConfig command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Player
Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.
740 741 742 743 744 745 746 747 748 749 750 |
# File 'generated/google/apis/games_v1/service.rb', line 740 def get_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/{playerId}', ) command.response_representation = Google::Apis::GamesV1::Player::Representation command.response_class = Google::Apis::GamesV1::Player command.params['playerId'] = player_id unless player_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Get the data for a room.
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'generated/google/apis/games_v1/service.rb', line 1027 def get_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'rooms/{roomId}', ) command.response_representation = Google::Apis::GamesV1::Room::Representation command.response_class = Google::Apis::GamesV1::Room command.params['roomId'] = room_id unless room_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse
Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, leaderboardId can be set to ALL to retrieve data for all leaderboards in a given time span. NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'.
1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 |
# File 'generated/google/apis/games_v1/service.rb', line 1243 def get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}', ) command.response_representation = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse command.params['playerId'] = player_id unless player_id.nil? command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.params['timeSpan'] = time_span unless time_span.nil? command.query['includeRankType'] = include_rank_type unless include_rank_type.nil? command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Snapshot
Retrieves the metadata for a given snapshot ID.
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 |
# File 'generated/google/apis/games_v1/service.rb', line 1478 def get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'snapshots/{snapshotId}', ) command.response_representation = Google::Apis::GamesV1::Snapshot::Representation command.response_class = Google::Apis::GamesV1::Snapshot command.params['snapshotId'] = snapshot_id unless snapshot_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Get the data for a turn-based match.
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 |
# File 'generated/google/apis/games_v1/service.rb', line 1738 def get_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'turnbasedmatches/{matchId}', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['includeMatchData'] = include_match_data unless include_match_data.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#increment_achievement(achievement_id, steps_to_increment, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementIncrementResponse
Increments the steps of the achievement with the given ID for the currently authenticated player.
124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'generated/google/apis/games_v1/service.rb', line 124 def increment_achievement(achievement_id, steps_to_increment, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'achievements/{achievementId}/increment', ) command.response_representation = Google::Apis::GamesV1::AchievementIncrementResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementIncrementResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['stepsToIncrement'] = steps_to_increment unless steps_to_increment.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'generated/google/apis/games_v1/service.rb', line 1065 def join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/{roomId}/join', ) command.request_representation = Google::Apis::GamesV1::JoinRoomRequest::Representation command.request_object = join_room_request_object command.response_representation = Google::Apis::GamesV1::Room::Representation command.response_class = Google::Apis::GamesV1::Room command.params['roomId'] = room_id unless room_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Join a turn-based match.
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 |
# File 'generated/google/apis/games_v1/service.rb', line 1775 def join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/join', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::Room
Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 |
# File 'generated/google/apis/games_v1/service.rb', line 1105 def leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/{roomId}/leave', ) command.request_representation = Google::Apis::GamesV1::LeaveRoomRequest::Representation command.request_object = leave_room_request_object command.response_representation = Google::Apis::GamesV1::Room::Representation command.response_class = Google::Apis::GamesV1::Room command.params['roomId'] = room_id unless room_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#leave_turn(match_id, match_version, language: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Leave a turn-based match during the current player's turn, without canceling the match.
1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 |
# File 'generated/google/apis/games_v1/service.rb', line 1856 def leave_turn(match_id, match_version, language: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/leaveTurn', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['matchVersion'] = match_version unless match_version.nil? command.query['pendingParticipantId'] = pending_participant_id unless pending_participant_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Leave a turn-based match when it is not the current player's turn, without canceling the match.
1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 |
# File 'generated/google/apis/games_v1/service.rb', line 1812 def leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/leave', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListAchievementDefinitionsResponse
Lists all the achievement definitions for your application.
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'generated/google/apis/games_v1/service.rb', line 82 def list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'achievements', ) command.response_representation = Google::Apis::GamesV1::ListAchievementDefinitionsResponse::Representation command.response_class = Google::Apis::GamesV1::ListAchievementDefinitionsResponse command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerAchievementResponse
Lists the progress for all your application's achievements for the currently authenticated player.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'generated/google/apis/games_v1/service.rb', line 172 def list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/{playerId}/achievements', ) command.response_representation = Google::Apis::GamesV1::ListPlayerAchievementResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerAchievementResponse command.params['playerId'] = player_id unless player_id.nil? command.query['language'] = language unless language.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['state'] = state unless state.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_event_by_player(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerEventResponse
Returns a list showing the current progress on events in this application for the currently authenticated user.
467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'generated/google/apis/games_v1/service.rb', line 467 def list_event_by_player(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'events', ) command.response_representation = Google::Apis::GamesV1::ListPlayerEventResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerEventResponse command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListEventDefinitionResponse
Returns a list of the event definitions in this application.
508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'generated/google/apis/games_v1/service.rb', line 508 def list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'eventDefinitions', ) command.response_representation = Google::Apis::GamesV1::ListEventDefinitionResponse::Representation command.response_class = Google::Apis::GamesV1::ListEventDefinitionResponse command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListLeaderboardResponse
Lists all the leaderboard metadata for your application.
622 623 624 625 626 627 628 629 630 631 632 633 |
# File 'generated/google/apis/games_v1/service.rb', line 622 def list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'leaderboards', ) command.response_representation = Google::Apis::GamesV1::ListLeaderboardResponse::Representation command.response_class = Google::Apis::GamesV1::ListLeaderboardResponse command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_metagame_categories_by_player(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListCategoryResponse
List play data aggregated per category for the player corresponding to playerId.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 |
# File 'generated/google/apis/games_v1/service.rb', line 699 def (player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/{playerId}/categories/{collection}', ) command.response_representation = Google::Apis::GamesV1::ListCategoryResponse::Representation command.response_class = Google::Apis::GamesV1::ListCategoryResponse command.params['playerId'] = player_id unless player_id.nil? command.params['collection'] = collection unless collection.nil? command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerResponse
Get the collection of players for the currently authenticated user.
782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'generated/google/apis/games_v1/service.rb', line 782 def list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/me/players/{collection}', ) command.response_representation = Google::Apis::GamesV1::ListPlayerResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerResponse command.params['collection'] = collection unless collection.nil? command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::RoomList
Returns invitations to join rooms.
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'generated/google/apis/games_v1/service.rb', line 1147 def list_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'rooms', ) command.response_representation = Google::Apis::GamesV1::RoomList::Representation command.response_class = Google::Apis::GamesV1::RoomList command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_score_window(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::LeaderboardScores
Lists the scores in a leaderboard around (and including) a player's score.
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 |
# File 'generated/google/apis/games_v1/service.rb', line 1352 def list_score_window(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'leaderboards/{leaderboardId}/window/{collection}', ) command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation command.response_class = Google::Apis::GamesV1::LeaderboardScores command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.params['collection'] = collection unless collection.nil? command.query['language'] = language unless language.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['resultsAbove'] = results_above unless results_above.nil? command.query['returnTopIfAbsent'] = return_top_if_absent unless return_top_if_absent.nil? command.query['timeSpan'] = time_span unless time_span.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_scores(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::LeaderboardScores
Lists the scores in a leaderboard, starting from the top.
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 |
# File 'generated/google/apis/games_v1/service.rb', line 1294 def list_scores(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'leaderboards/{leaderboardId}/scores/{collection}', ) command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation command.response_class = Google::Apis::GamesV1::LeaderboardScores command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.params['collection'] = collection unless collection.nil? command.query['language'] = language unless language.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['timeSpan'] = time_span unless time_span.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListSnapshotResponse
Retrieves a list of snapshots created by your application for the player corresponding to the player ID.
1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 |
# File 'generated/google/apis/games_v1/service.rb', line 1522 def list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'players/{playerId}/snapshots', ) command.response_representation = Google::Apis::GamesV1::ListSnapshotResponse::Representation command.response_class = Google::Apis::GamesV1::ListSnapshotResponse command.params['playerId'] = player_id unless player_id.nil? command.query['language'] = language unless language.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchList
Returns turn-based matches the player is or was involved in.
1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 |
# File 'generated/google/apis/games_v1/service.rb', line 1907 def list_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'turnbasedmatches', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatchList::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatchList command.query['includeMatchData'] = include_match_data unless include_match_data.nil? command.query['language'] = language unless language.nil? command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#played_application(builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Indicate that the the currently authenticated user is playing your application.
395 396 397 398 399 400 401 402 |
# File 'generated/google/apis/games_v1/service.rb', line 395 def played_application(builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'applications/played', ) command.query['builtinGameId'] = builtin_game_id unless builtin_game_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::UpdateEventResponse
Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.
545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'generated/google/apis/games_v1/service.rb', line 545 def record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'events', ) command.request_representation = Google::Apis::GamesV1::EventRecordRequest::Representation command.request_object = event_record_request_object command.response_representation = Google::Apis::GamesV1::UpdateEventResponse::Representation command.response_class = Google::Apis::GamesV1::UpdateEventResponse command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchRematch
Create a rematch of a match that was previously completed, with the same participants. This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn.
1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 |
# File 'generated/google/apis/games_v1/service.rb', line 1953 def rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'turnbasedmatches/{matchId}/rematch', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatchRematch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatchRematch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Removes a push token for the current user and application. Removing a non- existent push token will report success.
818 819 820 821 822 823 824 825 826 |
# File 'generated/google/apis/games_v1/service.rb', line 818 def remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'pushtokens/remove', ) command.request_representation = Google::Apis::GamesV1::PushTokenId::Representation command.request_object = push_token_id_object command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::RoomStatus
Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'generated/google/apis/games_v1/service.rb', line 1186 def report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'rooms/{roomId}/reportstatus', ) command.request_representation = Google::Apis::GamesV1::RoomP2PStatuses::Representation command.request_object = room_p2_p_statuses_object command.response_representation = Google::Apis::GamesV1::RoomStatus::Representation command.response_class = Google::Apis::GamesV1::RoomStatus command.params['roomId'] = room_id unless room_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementRevealResponse
Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
210 211 212 213 214 215 216 217 218 219 |
# File 'generated/google/apis/games_v1/service.rb', line 210 def reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'achievements/{achievementId}/reveal', ) command.response_representation = Google::Apis::GamesV1::AchievementRevealResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementRevealResponse 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#set_achievement_steps_at_least(achievement_id, steps, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse
Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.
248 249 250 251 252 253 254 255 256 257 258 |
# File 'generated/google/apis/games_v1/service.rb', line 248 def set_achievement_steps_at_least(achievement_id, steps, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'achievements/{achievementId}/setStepsAtLeast', ) command.response_representation = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['steps'] = steps unless steps.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#submit_score(leaderboard_id, score, language: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::PlayerScoreResponse
Submits a score to the specified leaderboard.
1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'generated/google/apis/games_v1/service.rb', line 1404 def submit_score(leaderboard_id, score, language: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'leaderboards/{leaderboardId}/scores', ) command.response_representation = Google::Apis::GamesV1::PlayerScoreResponse::Representation command.response_class = Google::Apis::GamesV1::PlayerScoreResponse command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.query['language'] = language unless language.nil? command.query['score'] = score unless score.nil? command.query['scoreTag'] = score_tag unless score_tag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#submit_score_multiple(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ListPlayerScoreResponse
Submits multiple scores to leaderboards.
1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 |
# File 'generated/google/apis/games_v1/service.rb', line 1441 def submit_score_multiple(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'leaderboards/scores', ) command.request_representation = Google::Apis::GamesV1::PlayerScoreSubmissionList::Representation command.request_object = player_score_submission_list_object command.response_representation = Google::Apis::GamesV1::ListPlayerScoreResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerScoreResponse command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatchSync
Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. Matches that should be removed from the local cache will have a status of MATCH_DELETED.
2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 |
# File 'generated/google/apis/games_v1/service.rb', line 2005 def sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'turnbasedmatches/sync', ) command.response_representation = Google::Apis::GamesV1::TurnBasedMatchSync::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatchSync command.query['includeMatchData'] = include_match_data unless include_match_data.nil? command.query['language'] = language unless language.nil? command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::TurnBasedMatch
Commit the results of a player turn.
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 |
# File 'generated/google/apis/games_v1/service.rb', line 2045 def take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'turnbasedmatches/{matchId}/turn', ) command.request_representation = Google::Apis::GamesV1::TurnBasedMatchTurn::Representation command.request_object = turn_based_match_turn_object command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation command.response_class = Google::Apis::GamesV1::TurnBasedMatch command.params['matchId'] = match_id unless match_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#unlock_achievement(achievement_id, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementUnlockResponse
Unlocks this achievement for the currently authenticated player.
284 285 286 287 288 289 290 291 292 293 294 |
# File 'generated/google/apis/games_v1/service.rb', line 284 def unlock_achievement(achievement_id, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'achievements/{achievementId}/unlock', ) command.response_representation = Google::Apis::GamesV1::AchievementUnlockResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementUnlockResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['builtinGameId'] = builtin_game_id unless builtin_game_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_multiple_achievements(achievement_update_multiple_request_object = nil, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::AchievementUpdateMultipleResponse
Updates multiple achievements for the currently authenticated player.
319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'generated/google/apis/games_v1/service.rb', line 319 def update_multiple_achievements(achievement_update_multiple_request_object = nil, builtin_game_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'achievements/updateMultiple', ) command.request_representation = Google::Apis::GamesV1::AchievementUpdateMultipleRequest::Representation command.request_object = achievement_update_multiple_request_object command.response_representation = Google::Apis::GamesV1::AchievementUpdateMultipleResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementUpdateMultipleResponse command.query['builtinGameId'] = builtin_game_id unless builtin_game_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Registers a push token for the current user and application.
849 850 851 852 853 854 855 856 857 |
# File 'generated/google/apis/games_v1/service.rb', line 849 def update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'pushtokens', ) command.request_representation = Google::Apis::GamesV1::PushToken::Representation command.request_object = push_token_object command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#verify_application(application_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GamesV1::ApplicationVerifyResponse
Verifies the auth token provided with this request is for the application with the specified ID, and returns the ID of the player it was granted for.
427 428 429 430 431 432 433 434 435 436 |
# File 'generated/google/apis/games_v1/service.rb', line 427 def verify_application(application_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'applications/{applicationId}/verify', ) command.response_representation = Google::Apis::GamesV1::ApplicationVerifyResponse::Representation command.response_class = Google::Apis::GamesV1::ApplicationVerifyResponse 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |