/* This is stub file for gapi.client.{{=it.name}} definition tests */ /* IMPORTANT. * This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. * In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator **/ gapi.load('client', () => { /** now we can use gapi.client */ gapi.client.load('gamesmanagement', 'v1management', () => { /** now we can use gapi.client.gamesmanagement */ /** don't forget to authenticate your client before sending any request to resources: */ /** declare client_id registered in Google Developers Console */ const client_id = '<>'; const scope = [ /** Share your Google+ profile information and view and manage your game activity */ 'https://www.googleapis.com/auth/games', /** Know the list of people in your circles, your age range, and language */ 'https://www.googleapis.com/auth/plus.login', ]; const immediate = true; gapi.auth.authorize({ client_id, scope, immediate }, authResult => { if (authResult && !authResult.error) { /** handle succesfull authorization */ run(); } else { /** handle authorization error */ } }); run(); }); async function run() { /** * Resets the achievement with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your * application. */ await gapi.client.achievements.reset({ achievementId: "achievementId", }); /** * Resets all achievements for the currently authenticated player for your application. This method is only accessible to whitelisted tester accounts for * your application. */ await gapi.client.achievements.resetAll({ }); /** Resets all draft achievements for all players. This method is only available to user accounts for your developer console. */ await gapi.client.achievements.resetAllForAllPlayers({ }); /** * Resets the achievement with the given ID for all players. This method is only available to user accounts for your developer console. Only draft * achievements can be reset. */ await gapi.client.achievements.resetForAllPlayers({ achievementId: "achievementId", }); /** * Resets achievements with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft * achievements may be reset. */ await gapi.client.achievements.resetMultipleForAllPlayers({ }); /** Get the list of players hidden from the given application. This method is only available to user accounts for your developer console. */ await gapi.client.applications.listHidden({ applicationId: "applicationId", maxResults: 2, pageToken: "pageToken", }); /** * Resets all player progress on the event with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester * accounts for your application. All quests for this player that use the event will also be reset. */ await gapi.client.events.reset({ eventId: "eventId", }); /** * Resets all player progress on all events for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your * application. All quests for this player will also be reset. */ await gapi.client.events.resetAll({ }); /** * Resets all draft events for all players. This method is only available to user accounts for your developer console. All quests that use any of these * events will also be reset. */ await gapi.client.events.resetAllForAllPlayers({ }); /** * Resets the event with the given ID for all players. This method is only available to user accounts for your developer console. Only draft events can be * reset. All quests that use the event will also be reset. */ await gapi.client.events.resetForAllPlayers({ eventId: "eventId", }); /** * Resets events with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft events may be * reset. All quests that use any of the events will also be reset. */ await gapi.client.events.resetMultipleForAllPlayers({ }); /** Hide the given player's leaderboard scores from the given application. This method is only available to user accounts for your developer console. */ await gapi.client.players.hide({ applicationId: "applicationId", playerId: "playerId", }); /** Unhide the given player's leaderboard scores from the given application. This method is only available to user accounts for your developer console. */ await gapi.client.players.unhide({ applicationId: "applicationId", playerId: "playerId", }); /** * Resets all player progress on the quest with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester * accounts for your application. */ await gapi.client.quests.reset({ questId: "questId", }); /** * Resets all player progress on all quests for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your * application. */ await gapi.client.quests.resetAll({ }); /** Resets all draft quests for all players. This method is only available to user accounts for your developer console. */ await gapi.client.quests.resetAllForAllPlayers({ }); /** * Resets all player progress on the quest with the given ID for all players. This method is only available to user accounts for your developer console. * Only draft quests can be reset. */ await gapi.client.quests.resetForAllPlayers({ questId: "questId", }); /** * Resets quests with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft quests may be * reset. */ await gapi.client.quests.resetMultipleForAllPlayers({ }); /** * Reset all rooms for the currently authenticated player for your application. This method is only accessible to whitelisted tester accounts for your * application. */ await gapi.client.rooms.reset({ }); /** * Deletes rooms where the only room participants are from whitelisted tester accounts for your application. This method is only available to user * accounts for your developer console. */ await gapi.client.rooms.resetForAllPlayers({ }); /** * Resets scores for the leaderboard with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester * accounts for your application. */ await gapi.client.scores.reset({ leaderboardId: "leaderboardId", }); /** * Resets all scores for all leaderboards for the currently authenticated players. This method is only accessible to whitelisted tester accounts for your * application. */ await gapi.client.scores.resetAll({ }); /** Resets scores for all draft leaderboards for all players. This method is only available to user accounts for your developer console. */ await gapi.client.scores.resetAllForAllPlayers({ }); /** * Resets scores for the leaderboard with the given ID for all players. This method is only available to user accounts for your developer console. Only * draft leaderboards can be reset. */ await gapi.client.scores.resetForAllPlayers({ leaderboardId: "leaderboardId", }); /** * Resets scores for the leaderboards with the given IDs for all players. This method is only available to user accounts for your developer console. Only * draft leaderboards may be reset. */ await gapi.client.scores.resetMultipleForAllPlayers({ }); /** Reset all turn-based match data for a user. This method is only accessible to whitelisted tester accounts for your application. */ await gapi.client.turnBasedMatches.reset({ }); /** * Deletes turn-based matches where the only match participants are from whitelisted tester accounts for your application. This method is only available * to user accounts for your developer console. */ await gapi.client.turnBasedMatches.resetForAllPlayers({ }); } });