/// <summary>
        /// Get the list of players hidden from the given application. This method is only available to user accounts for your developer console.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/applications/listHidden
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="applicationId">The application ID from the Google Play developer console.</param>
        /// <param name="optional">Optional paramaters.</param>        /// <returns>HiddenPlayerListResponse</returns>
        public static HiddenPlayerList ListHidden(GamesManagementService service, string applicationId, ApplicationsListHiddenOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (applicationId == null)
                {
                    throw new ArgumentNullException(applicationId);
                }

                // Building the initial request.
                var request = service.Applications.ListHidden(applicationId);

                // Applying optional parameters to the request.
                request = (ApplicationsResource.ListHiddenRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Applications.ListHidden failed.", ex);
            }
        }
示例#2
0
        /// <summary>
        /// Unhide the given player's leaderboard scores from the given application. This method is only available to user accounts for your developer console.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/players/unhide
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="applicationId">The application ID from the Google Play developer console.</param>
        /// <param name="playerId">A player ID. A value of me may be used in place of the authenticated player's ID.</param>
        public static void Unhide(GamesManagementService service, string applicationId, string playerId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (applicationId == null)
                {
                    throw new ArgumentNullException(applicationId);
                }
                if (playerId == null)
                {
                    throw new ArgumentNullException(playerId);
                }

                // Make the request.
                return(service.Players.Unhide(applicationId, playerId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Players.Unhide failed.", ex);
            }
        }
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/events/resetAll
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        public static void ResetAll(GamesManagementService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.Events.ResetAll().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Events.ResetAll failed.", ex);
            }
        }
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/turnBasedMatches/resetForAllPlayers
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        public static void ResetForAllPlayers(GamesManagementService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.TurnBasedMatches.ResetForAllPlayers().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request TurnBasedMatches.ResetForAllPlayers failed.", ex);
            }
        }
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/events/resetMultipleForAllPlayers
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="body">A valid GamesManagement v1management body.</param>
        public static void ResetMultipleForAllPlayers(GamesManagementService service, EventsResetMultipleForAllRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Events.ResetMultipleForAllPlayers(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Events.ResetMultipleForAllPlayers failed.", ex);
            }
        }
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/events/resetForAllPlayers
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="eventId">The ID of the event.</param>
        public static void ResetForAllPlayers(GamesManagementService service, string eventId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (eventId == null)
                {
                    throw new ArgumentNullException(eventId);
                }

                // Make the request.
                return(service.Events.ResetForAllPlayers(eventId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Events.ResetForAllPlayers failed.", ex);
            }
        }
示例#7
0
        /// <summary>
        /// Resets the achievement with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your application.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/achievements/reset
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="achievementId">The ID of the achievement used by this method.</param>
        /// <returns>AchievementResetResponseResponse</returns>
        public static AchievementResetResponse Reset(GamesManagementService service, string achievementId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (achievementId == null)
                {
                    throw new ArgumentNullException(achievementId);
                }

                // Make the request.
                return(service.Achievements.Reset(achievementId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Achievements.Reset failed.", ex);
            }
        }
示例#8
0
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/scores/reset
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="leaderboardId">The ID of the leaderboard.</param>
        /// <returns>PlayerScoreResetResponseResponse</returns>
        public static PlayerScoreResetResponse Reset(GamesManagementService service, string leaderboardId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (leaderboardId == null)
                {
                    throw new ArgumentNullException(leaderboardId);
                }

                // Make the request.
                return(service.Scores.Reset(leaderboardId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Scores.Reset failed.", ex);
            }
        }
示例#9
0
        /// <summary>
        /// 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.
        /// Documentation https://developers.google.com/gamesmanagement/v1management/reference/quests/reset
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated GamesManagement service.</param>
        /// <param name="questId">The ID of the quest.</param>
        public static void Reset(GamesManagementService service, string questId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (questId == null)
                {
                    throw new ArgumentNullException(questId);
                }

                // Make the request.
                return(service.Quests.Reset(questId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Quests.Reset failed.", ex);
            }
        }