| Index: generated/googleapis/lib/gamesmanagement/v1management.dart
|
| diff --git a/generated/googleapis/lib/gamesmanagement/v1management.dart b/generated/googleapis/lib/gamesmanagement/v1management.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..94cf47c0898d9b3a62cd5bdd32a8e331d356f7b8
|
| --- /dev/null
|
| +++ b/generated/googleapis/lib/gamesmanagement/v1management.dart
|
| @@ -0,0 +1,1216 @@
|
| +library googleapis.gamesManagement.v1management;
|
| +
|
| +import "dart:core" as core;
|
| +import "dart:collection" as collection;
|
| +import "dart:async" as async;
|
| +import "dart:convert" as convert;
|
| +
|
| +import "package:crypto/crypto.dart" as crypto;
|
| +import 'package:http/http.dart' as http;
|
| +import '../src/common_internal.dart' as common_internal;
|
| +import '../common/common.dart' as common;
|
| +
|
| +export '../common/common.dart' show ApiRequestError;
|
| +export '../common/common.dart' show DetailedApiRequestError;
|
| +
|
| +/** The Management API for Google Play Game Services. */
|
| +class GamesManagementApi {
|
| + /**
|
| + * Share your Google+ profile information and view and manage your game
|
| + * activity
|
| + */
|
| + static const GamesScope = "https://www.googleapis.com/auth/games";
|
| +
|
| + /** Know your basic profile info and list of people in your circles. */
|
| + static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login";
|
| +
|
| +
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + AchievementsResourceApi get achievements => new AchievementsResourceApi(_requester);
|
| + ApplicationsResourceApi get applications => new ApplicationsResourceApi(_requester);
|
| + EventsResourceApi get events => new EventsResourceApi(_requester);
|
| + PlayersResourceApi get players => new PlayersResourceApi(_requester);
|
| + QuestsResourceApi get quests => new QuestsResourceApi(_requester);
|
| + RoomsResourceApi get rooms => new RoomsResourceApi(_requester);
|
| + ScoresResourceApi get scores => new ScoresResourceApi(_requester);
|
| + TurnBasedMatchesResourceApi get turnBasedMatches => new TurnBasedMatchesResourceApi(_requester);
|
| +
|
| + GamesManagementApi(http.Client client) :
|
| + _requester = new common_internal.ApiRequester(client, "https://www.googleapis.com/", "/games/v1management/");
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class AchievementsResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + AchievementsResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Resets the achievement with the given ID for the currently authenticated
|
| + * player. This method is only accessible to whitelisted tester accounts for
|
| + * your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [achievementId] - The ID of the achievement used by this method.
|
| + *
|
| + * Completes with a [AchievementResetResponse].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<AchievementResetResponse> reset(core.String achievementId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (achievementId == null) {
|
| + throw new core.ArgumentError("Parameter achievementId is required.");
|
| + }
|
| +
|
| +
|
| + _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievementId') + '/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new AchievementResetResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Resets all achievements for the currently authenticated player for your
|
| + * application. This method is only accessible to whitelisted tester accounts
|
| + * for your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * Completes with a [AchievementResetAllResponse].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<AchievementResetAllResponse> resetAll() {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| +
|
| +
|
| + _url = 'achievements/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new AchievementResetAllResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Resets the achievement with the given ID for the all players. This method
|
| + * is only available to user accounts for your developer console. Only draft
|
| + * achievements can be reset.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [achievementId] - The ID of the achievement used by this method.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future resetForAllPlayers(core.String achievementId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (achievementId == null) {
|
| + throw new core.ArgumentError("Parameter achievementId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievementId') + '/resetForAllPlayers';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class ApplicationsResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + ApplicationsResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Get the list of players hidden from the given application. This method is
|
| + * only available to user accounts for your developer console.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [applicationId] - The application being requested.
|
| + *
|
| + * [maxResults] - The maximum number of player resources to return in the
|
| + * response, used for paging. For any response, the actual number of player
|
| + * resources returned may be less than the specified maxResults.
|
| + * Value must be between "1" and "15".
|
| + *
|
| + * [pageToken] - The token returned by the previous request.
|
| + *
|
| + * Completes with a [HiddenPlayerList].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<HiddenPlayerList> listHidden(core.String applicationId, {core.int maxResults, core.String pageToken}) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (applicationId == null) {
|
| + throw new core.ArgumentError("Parameter applicationId is required.");
|
| + }
|
| + if (maxResults != null) {
|
| + _queryParams["maxResults"] = ["${maxResults}"];
|
| + }
|
| + if (pageToken != null) {
|
| + _queryParams["pageToken"] = [pageToken];
|
| + }
|
| +
|
| +
|
| + _url = 'applications/' + common_internal.Escaper.ecapeVariable('$applicationId') + '/players/hidden';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new HiddenPlayerList.fromJson(data));
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class EventsResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + EventsResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Reset all player progress on the event for the currently authenticated
|
| + * player. This method is only accessible to whitelisted tester accounts for
|
| + * your application. All resources that use the event will also be reset.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [eventId] - The ID of the event.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future reset(core.String eventId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (eventId == null) {
|
| + throw new core.ArgumentError("Parameter eventId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'events/' + common_internal.Escaper.ecapeVariable('$eventId') + '/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| + /**
|
| + * Reset all player progress on all unpublished events for the currently
|
| + * authenticated player. This method is only accessible to whitelisted tester
|
| + * accounts for your application. All resources that use the events will also
|
| + * be reset.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future resetAll() {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'events/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| + /**
|
| + * Reset all player progress on the event for all players. This method is only
|
| + * available to user accounts for your developer console. Only draft events
|
| + * can be reset. All resources that use the event will also be reset.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [eventId] - The ID of the event.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future resetForAllPlayers(core.String eventId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (eventId == null) {
|
| + throw new core.ArgumentError("Parameter eventId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'events/' + common_internal.Escaper.ecapeVariable('$eventId') + '/resetForAllPlayers';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class PlayersResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + PlayersResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Hide the given player's leaderboard scores from the given application. This
|
| + * method is only available to user accounts for your developer console.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [applicationId] - The application being requested.
|
| + *
|
| + * [playerId] - A player ID. A value of me may be used in place of the
|
| + * authenticated player's ID.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future hide(core.String applicationId, core.String playerId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (applicationId == null) {
|
| + throw new core.ArgumentError("Parameter applicationId is required.");
|
| + }
|
| + if (playerId == null) {
|
| + throw new core.ArgumentError("Parameter playerId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'applications/' + common_internal.Escaper.ecapeVariable('$applicationId') + '/players/hidden/' + common_internal.Escaper.ecapeVariable('$playerId');
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| + /**
|
| + * Unhide the given player's leaderboard scores from the given application.
|
| + * This method is only available to user accounts for your developer console.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [applicationId] - The application being requested.
|
| + *
|
| + * [playerId] - A player ID. A value of me may be used in place of the
|
| + * authenticated player's ID.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future unhide(core.String applicationId, core.String playerId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (applicationId == null) {
|
| + throw new core.ArgumentError("Parameter applicationId is required.");
|
| + }
|
| + if (playerId == null) {
|
| + throw new core.ArgumentError("Parameter playerId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'applications/' + common_internal.Escaper.ecapeVariable('$applicationId') + '/players/hidden/' + common_internal.Escaper.ecapeVariable('$playerId');
|
| +
|
| + var _response = _requester.request(_url,
|
| + "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class QuestsResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + QuestsResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Reset all player progress on the quest for the currently authenticated
|
| + * player. This method is only accessible to whitelisted tester accounts for
|
| + * your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [questId] - The ID of the quest.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future reset(core.String questId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (questId == null) {
|
| + throw new core.ArgumentError("Parameter questId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'quests/' + common_internal.Escaper.ecapeVariable('$questId') + '/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class RoomsResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + RoomsResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Reset all rooms for the currently authenticated player for your
|
| + * application. This method is only accessible to whitelisted tester accounts
|
| + * for your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future reset() {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'rooms/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class ScoresResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + ScoresResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Reset scores for the specified leaderboard for the currently authenticated
|
| + * player. This method is only accessible to whitelisted tester accounts for
|
| + * your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [leaderboardId] - The ID of the leaderboard.
|
| + *
|
| + * Completes with a [PlayerScoreResetResponse].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<PlayerScoreResetResponse> reset(core.String leaderboardId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (leaderboardId == null) {
|
| + throw new core.ArgumentError("Parameter leaderboardId is required.");
|
| + }
|
| +
|
| +
|
| + _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboardId') + '/scores/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new PlayerScoreResetResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Reset scores for the specified leaderboard for all players. This method is
|
| + * only available to user accounts for your developer console. Only draft
|
| + * leaderboards can be reset.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [leaderboardId] - The ID of the leaderboard.
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future resetForAllPlayers(core.String leaderboardId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (leaderboardId == null) {
|
| + throw new core.ArgumentError("Parameter leaderboardId is required.");
|
| + }
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboardId') + '/scores/resetForAllPlayers';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +/** Not documented yet. */
|
| +class TurnBasedMatchesResourceApi {
|
| + final common_internal.ApiRequester _requester;
|
| +
|
| + TurnBasedMatchesResourceApi(common_internal.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Reset all turn-based match data for a user. This method is only accessible
|
| + * to whitelisted tester accounts for your application.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future reset() {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| +
|
| + _downloadOptions = null;
|
| +
|
| + _url = 'turnbasedmatches/reset';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => null);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +
|
| +/** This is a JSON template for achievement reset all response. */
|
| +class AchievementResetAllResponse {
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#achievementResetAllResponse.
|
| + */
|
| + core.String kind;
|
| +
|
| + /** The achievement reset results. */
|
| + core.List<AchievementResetResponse> results;
|
| +
|
| +
|
| + AchievementResetAllResponse();
|
| +
|
| + AchievementResetAllResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("results")) {
|
| + results = _json["results"].map((value) => new AchievementResetResponse.fromJson(value)).toList();
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (results != null) {
|
| + _json["results"] = results.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for an achievement reset response. */
|
| +class AchievementResetResponse {
|
| + /**
|
| + * The current state of the achievement. This is the same as the initial state
|
| + * of the achievement.
|
| + * Possible values are:
|
| + * - "HIDDEN"- Achievement is hidden.
|
| + * - "REVEALED" - Achievement is revealed.
|
| + * - "UNLOCKED" - Achievement is unlocked.
|
| + */
|
| + core.String currentState;
|
| +
|
| + /** The ID of an achievement for which player state has been updated. */
|
| + core.String definitionId;
|
| +
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#achievementResetResponse.
|
| + */
|
| + core.String kind;
|
| +
|
| + /** Flag to indicate if the requested update actually occurred. */
|
| + core.bool updateOccurred;
|
| +
|
| +
|
| + AchievementResetResponse();
|
| +
|
| + AchievementResetResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("currentState")) {
|
| + currentState = _json["currentState"];
|
| + }
|
| + if (_json.containsKey("definitionId")) {
|
| + definitionId = _json["definitionId"];
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("updateOccurred")) {
|
| + updateOccurred = _json["updateOccurred"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (currentState != null) {
|
| + _json["currentState"] = currentState;
|
| + }
|
| + if (definitionId != null) {
|
| + _json["definitionId"] = definitionId;
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (updateOccurred != null) {
|
| + _json["updateOccurred"] = updateOccurred;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/**
|
| + * This is a JSON template for metadata about a player playing a game with the
|
| + * currently authenticated user.
|
| + */
|
| +class GamesPlayedResource {
|
| + /**
|
| + * True if the player was auto-matched with the currently authenticated user.
|
| + */
|
| + core.bool autoMatched;
|
| +
|
| + /**
|
| + * The last time the player played the game in milliseconds since the epoch in
|
| + * UTC.
|
| + */
|
| + core.String timeMillis;
|
| +
|
| +
|
| + GamesPlayedResource();
|
| +
|
| + GamesPlayedResource.fromJson(core.Map _json) {
|
| + if (_json.containsKey("autoMatched")) {
|
| + autoMatched = _json["autoMatched"];
|
| + }
|
| + if (_json.containsKey("timeMillis")) {
|
| + timeMillis = _json["timeMillis"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (autoMatched != null) {
|
| + _json["autoMatched"] = autoMatched;
|
| + }
|
| + if (timeMillis != null) {
|
| + _json["timeMillis"] = timeMillis;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/**
|
| + * This is a JSON template for 1P/3P metadata about the player's experience.
|
| + */
|
| +class GamesPlayerExperienceInfoResource {
|
| + /** The current number of experience points for the player. */
|
| + core.String currentExperiencePoints;
|
| +
|
| + /** The current level of the player. */
|
| + GamesPlayerLevelResource currentLevel;
|
| +
|
| + /**
|
| + * The timestamp when the player was leveled up, in millis since Unix epoch
|
| + * UTC.
|
| + */
|
| + core.String lastLevelUpTimestampMillis;
|
| +
|
| + /**
|
| + * The next level of the player. If the current level is the maximum level,
|
| + * this should be same as the current level.
|
| + */
|
| + GamesPlayerLevelResource nextLevel;
|
| +
|
| +
|
| + GamesPlayerExperienceInfoResource();
|
| +
|
| + GamesPlayerExperienceInfoResource.fromJson(core.Map _json) {
|
| + if (_json.containsKey("currentExperiencePoints")) {
|
| + currentExperiencePoints = _json["currentExperiencePoints"];
|
| + }
|
| + if (_json.containsKey("currentLevel")) {
|
| + currentLevel = new GamesPlayerLevelResource.fromJson(_json["currentLevel"]);
|
| + }
|
| + if (_json.containsKey("lastLevelUpTimestampMillis")) {
|
| + lastLevelUpTimestampMillis = _json["lastLevelUpTimestampMillis"];
|
| + }
|
| + if (_json.containsKey("nextLevel")) {
|
| + nextLevel = new GamesPlayerLevelResource.fromJson(_json["nextLevel"]);
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (currentExperiencePoints != null) {
|
| + _json["currentExperiencePoints"] = currentExperiencePoints;
|
| + }
|
| + if (currentLevel != null) {
|
| + _json["currentLevel"] = (currentLevel).toJson();
|
| + }
|
| + if (lastLevelUpTimestampMillis != null) {
|
| + _json["lastLevelUpTimestampMillis"] = lastLevelUpTimestampMillis;
|
| + }
|
| + if (nextLevel != null) {
|
| + _json["nextLevel"] = (nextLevel).toJson();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for 1P/3P metadata about a user's level. */
|
| +class GamesPlayerLevelResource {
|
| + /** The level for the user. */
|
| + core.int level;
|
| +
|
| + /** The maximum experience points for this level. */
|
| + core.String maxExperiencePoints;
|
| +
|
| + /** The minimum experience points for this level. */
|
| + core.String minExperiencePoints;
|
| +
|
| +
|
| + GamesPlayerLevelResource();
|
| +
|
| + GamesPlayerLevelResource.fromJson(core.Map _json) {
|
| + if (_json.containsKey("level")) {
|
| + level = _json["level"];
|
| + }
|
| + if (_json.containsKey("maxExperiencePoints")) {
|
| + maxExperiencePoints = _json["maxExperiencePoints"];
|
| + }
|
| + if (_json.containsKey("minExperiencePoints")) {
|
| + minExperiencePoints = _json["minExperiencePoints"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (level != null) {
|
| + _json["level"] = level;
|
| + }
|
| + if (maxExperiencePoints != null) {
|
| + _json["maxExperiencePoints"] = maxExperiencePoints;
|
| + }
|
| + if (minExperiencePoints != null) {
|
| + _json["minExperiencePoints"] = minExperiencePoints;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for the HiddenPlayer resource. */
|
| +class HiddenPlayer {
|
| + /** The time this player was hidden. */
|
| + core.String hiddenTimeMillis;
|
| +
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#hiddenPlayer.
|
| + */
|
| + core.String kind;
|
| +
|
| + /** The player information. */
|
| + Player player;
|
| +
|
| +
|
| + HiddenPlayer();
|
| +
|
| + HiddenPlayer.fromJson(core.Map _json) {
|
| + if (_json.containsKey("hiddenTimeMillis")) {
|
| + hiddenTimeMillis = _json["hiddenTimeMillis"];
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("player")) {
|
| + player = new Player.fromJson(_json["player"]);
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (hiddenTimeMillis != null) {
|
| + _json["hiddenTimeMillis"] = hiddenTimeMillis;
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (player != null) {
|
| + _json["player"] = (player).toJson();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for a list of hidden players. */
|
| +class HiddenPlayerList {
|
| + /** The players. */
|
| + core.List<HiddenPlayer> items;
|
| +
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#hiddenPlayerList.
|
| + */
|
| + core.String kind;
|
| +
|
| + /** The pagination token for the next page of results. */
|
| + core.String nextPageToken;
|
| +
|
| +
|
| + HiddenPlayerList();
|
| +
|
| + HiddenPlayerList.fromJson(core.Map _json) {
|
| + if (_json.containsKey("items")) {
|
| + items = _json["items"].map((value) => new HiddenPlayer.fromJson(value)).toList();
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("nextPageToken")) {
|
| + nextPageToken = _json["nextPageToken"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (items != null) {
|
| + _json["items"] = items.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (nextPageToken != null) {
|
| + _json["nextPageToken"] = nextPageToken;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/**
|
| + * An object representation of the individual components of the player's name.
|
| + * For some players, these fields may not be present.
|
| + */
|
| +class PlayerName {
|
| + /**
|
| + * The family name of this player. In some places, this is known as the last
|
| + * name.
|
| + */
|
| + core.String familyName;
|
| +
|
| + /**
|
| + * The given name of this player. In some places, this is known as the first
|
| + * name.
|
| + */
|
| + core.String givenName;
|
| +
|
| +
|
| + PlayerName();
|
| +
|
| + PlayerName.fromJson(core.Map _json) {
|
| + if (_json.containsKey("familyName")) {
|
| + familyName = _json["familyName"];
|
| + }
|
| + if (_json.containsKey("givenName")) {
|
| + givenName = _json["givenName"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (familyName != null) {
|
| + _json["familyName"] = familyName;
|
| + }
|
| + if (givenName != null) {
|
| + _json["givenName"] = givenName;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for a Player resource. */
|
| +class Player {
|
| + /** The base URL for the image that represents the player. */
|
| + core.String avatarImageUrl;
|
| +
|
| + /** The name to display for the player. */
|
| + core.String displayName;
|
| +
|
| + /**
|
| + * An object to represent Play Game experience information for the player.
|
| + */
|
| + GamesPlayerExperienceInfoResource experienceInfo;
|
| +
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#player.
|
| + */
|
| + core.String kind;
|
| +
|
| + /**
|
| + * Details about the last time this player played a multiplayer game with the
|
| + * currently authenticated player. Populated for PLAYED_WITH player collection
|
| + * members.
|
| + */
|
| + GamesPlayedResource lastPlayedWith;
|
| +
|
| + /**
|
| + * An object representation of the individual components of the player's name.
|
| + * For some players, these fields may not be present.
|
| + */
|
| + PlayerName name;
|
| +
|
| + /** The ID of the player. */
|
| + core.String playerId;
|
| +
|
| + /** The player's title rewarded for their game activities. */
|
| + core.String title;
|
| +
|
| +
|
| + Player();
|
| +
|
| + Player.fromJson(core.Map _json) {
|
| + if (_json.containsKey("avatarImageUrl")) {
|
| + avatarImageUrl = _json["avatarImageUrl"];
|
| + }
|
| + if (_json.containsKey("displayName")) {
|
| + displayName = _json["displayName"];
|
| + }
|
| + if (_json.containsKey("experienceInfo")) {
|
| + experienceInfo = new GamesPlayerExperienceInfoResource.fromJson(_json["experienceInfo"]);
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("lastPlayedWith")) {
|
| + lastPlayedWith = new GamesPlayedResource.fromJson(_json["lastPlayedWith"]);
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = new PlayerName.fromJson(_json["name"]);
|
| + }
|
| + if (_json.containsKey("playerId")) {
|
| + playerId = _json["playerId"];
|
| + }
|
| + if (_json.containsKey("title")) {
|
| + title = _json["title"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (avatarImageUrl != null) {
|
| + _json["avatarImageUrl"] = avatarImageUrl;
|
| + }
|
| + if (displayName != null) {
|
| + _json["displayName"] = displayName;
|
| + }
|
| + if (experienceInfo != null) {
|
| + _json["experienceInfo"] = (experienceInfo).toJson();
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (lastPlayedWith != null) {
|
| + _json["lastPlayedWith"] = (lastPlayedWith).toJson();
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = (name).toJson();
|
| + }
|
| + if (playerId != null) {
|
| + _json["playerId"] = playerId;
|
| + }
|
| + if (title != null) {
|
| + _json["title"] = title;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
| +/** This is a JSON template for a list of reset leaderboard entry resources. */
|
| +class PlayerScoreResetResponse {
|
| + /**
|
| + * Uniquely identifies the type of this resource. Value is always the fixed
|
| + * string gamesManagement#playerScoreResetResponse.
|
| + */
|
| + core.String kind;
|
| +
|
| + /**
|
| + * The time spans of the updated score.
|
| + * Possible values are:
|
| + * - "ALL_TIME" - The score is an all-time score.
|
| + * - "WEEKLY" - The score is a weekly score.
|
| + * - "DAILY" - The score is a daily score.
|
| + */
|
| + core.List<core.String> resetScoreTimeSpans;
|
| +
|
| +
|
| + PlayerScoreResetResponse();
|
| +
|
| + PlayerScoreResetResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("resetScoreTimeSpans")) {
|
| + resetScoreTimeSpans = _json["resetScoreTimeSpans"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (resetScoreTimeSpans != null) {
|
| + _json["resetScoreTimeSpans"] = resetScoreTimeSpans;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +
|
|
|