From d89629c3918bf9c2b83d3210537abd5de131a458 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 11 Dec 2015 22:17:24 +0000 Subject: [PATCH 01/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 1 + PlayFabSDK/source/PlayFabClientAPI.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 88451636..26cbed69 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -2873,6 +2873,7 @@ public static async Task> AttributeInstall var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); AttributeInstallResult result = resultData.data; + // Modify AdvertisingIdType: Prevents us from sending the id multiple times, and allows automated tests to determine id was sent successfully PlayFabSettings.AdvertisingIdType += "_Successful"; return new PlayFabResult { Result = result }; diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 88451636..26cbed69 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -2873,6 +2873,7 @@ public static async Task> AttributeInstall var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); AttributeInstallResult result = resultData.data; + // Modify AdvertisingIdType: Prevents us from sending the id multiple times, and allows automated tests to determine id was sent successfully PlayFabSettings.AdvertisingIdType += "_Successful"; return new PlayFabResult { Result = result }; From 45458824e7d3ce5897c487ea83360a92bcd00cfa Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Tue, 15 Dec 2015 05:17:51 +0000 Subject: [PATCH 02/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 46 ++++++ PlayFabSDK/source/PlayFabAdminAPI.cs | 165 ++++++++++++++++++++ PlayFabSDK/source/PlayFabClientAPI.cs | 46 ++++++ PlayFabSDK/source/PlayFabServerAPI.cs | 146 +++++++++++++++++ PlayFabServerSDK/source/PlayFabAdminAPI.cs | 165 ++++++++++++++++++++ PlayFabServerSDK/source/PlayFabServerAPI.cs | 146 +++++++++++++++++ 6 files changed, 714 insertions(+) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 26cbed69..5e6814ba 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -1251,6 +1251,29 @@ public static async Task> G return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -1376,6 +1399,29 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } + + public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Creates and updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabAdminAPI.cs b/PlayFabSDK/source/PlayFabAdminAPI.cs index 600321c0..3f7ba4b5 100644 --- a/PlayFabSDK/source/PlayFabAdminAPI.cs +++ b/PlayFabSDK/source/PlayFabAdminAPI.cs @@ -113,6 +113,29 @@ public static async Task> Update return new PlayFabResult { Result = result }; } + + public static async Task> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + CreatePlayerStatisticDefinitionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. /// @@ -163,6 +186,52 @@ public static async Task> GetDataReportAsync( return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticDefinitionsAsync(GetPlayerStatisticDefinitionsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticDefinitionsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + + public static async Task> GetPlayerStatisticVersionsAsync(GetPlayerStatisticVersionsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticVersionsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -313,6 +382,54 @@ public static async Task> GetUserReadOnlyDataAs return new PlayFabResult { Result = result }; } + + public static async Task> IncrementPlayerStatisticVersionAsync(IncrementPlayerStatisticVersionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + IncrementPlayerStatisticVersionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Attempts to process an order refund through the original real money payment provider. + /// + public static async Task> RefundPurchaseAsync(RefundPurchaseRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/RefundPurchase", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + RefundPurchaseResponse result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Completely removes all statistics for the specified user, for the current game /// @@ -338,6 +455,54 @@ public static async Task> ResetUserStat return new PlayFabResult { Result = result }; } + /// + /// Attempts to resolve a dispute with the original order's payment provider. + /// + public static async Task> ResolvePurchaseDisputeAsync(ResolvePurchaseDisputeRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/ResolvePurchaseDispute", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + ResolvePurchaseDisputeResponse result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + + public static async Task> UpdatePlayerStatisticDefinitionAsync(UpdatePlayerStatisticDefinitionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticDefinitionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 26cbed69..5e6814ba 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -1251,6 +1251,29 @@ public static async Task> G return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -1376,6 +1399,29 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } + + public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Creates and updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabServerAPI.cs b/PlayFabSDK/source/PlayFabServerAPI.cs index a824a114..05cd6a8b 100644 --- a/PlayFabSDK/source/PlayFabServerAPI.cs +++ b/PlayFabSDK/source/PlayFabServerAPI.cs @@ -138,6 +138,31 @@ public static async Task> DeleteUsersAsync(Dele return new PlayFabResult { Result = result }; } + /// + /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + /// + public static async Task> GetFriendLeaderboardAsync(GetFriendLeaderboardRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendLeaderboard", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetLeaderboardResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -188,6 +213,29 @@ public static async Task> GetLeade return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -363,6 +411,29 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } + + public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UpdatePlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// @@ -1088,6 +1159,81 @@ public static async Task> Updat return new PlayFabResult { Result = result }; } + /// + /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public static async Task> AddFriendAsync(AddFriendRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/AddFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + EmptyResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public static async Task> GetFriendsListAsync(GetFriendsListRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendsList", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetFriendsListResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Removes the specified friend from the the user's friend list + /// + public static async Task> RemoveFriendAsync(RemoveFriendRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/RemoveFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + EmptyResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Informs the PlayFab match-making service that the user specified has left the Game Server Instance /// diff --git a/PlayFabServerSDK/source/PlayFabAdminAPI.cs b/PlayFabServerSDK/source/PlayFabAdminAPI.cs index 600321c0..3f7ba4b5 100644 --- a/PlayFabServerSDK/source/PlayFabAdminAPI.cs +++ b/PlayFabServerSDK/source/PlayFabAdminAPI.cs @@ -113,6 +113,29 @@ public static async Task> Update return new PlayFabResult { Result = result }; } + + public static async Task> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + CreatePlayerStatisticDefinitionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. /// @@ -163,6 +186,52 @@ public static async Task> GetDataReportAsync( return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticDefinitionsAsync(GetPlayerStatisticDefinitionsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticDefinitionsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + + public static async Task> GetPlayerStatisticVersionsAsync(GetPlayerStatisticVersionsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticVersionsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -313,6 +382,54 @@ public static async Task> GetUserReadOnlyDataAs return new PlayFabResult { Result = result }; } + + public static async Task> IncrementPlayerStatisticVersionAsync(IncrementPlayerStatisticVersionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + IncrementPlayerStatisticVersionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Attempts to process an order refund through the original real money payment provider. + /// + public static async Task> RefundPurchaseAsync(RefundPurchaseRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/RefundPurchase", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + RefundPurchaseResponse result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Completely removes all statistics for the specified user, for the current game /// @@ -338,6 +455,54 @@ public static async Task> ResetUserStat return new PlayFabResult { Result = result }; } + /// + /// Attempts to resolve a dispute with the original order's payment provider. + /// + public static async Task> ResolvePurchaseDisputeAsync(ResolvePurchaseDisputeRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/ResolvePurchaseDispute", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + ResolvePurchaseDisputeResponse result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + + public static async Task> UpdatePlayerStatisticDefinitionAsync(UpdatePlayerStatisticDefinitionRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticDefinitionResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabServerSDK/source/PlayFabServerAPI.cs b/PlayFabServerSDK/source/PlayFabServerAPI.cs index a824a114..05cd6a8b 100644 --- a/PlayFabServerSDK/source/PlayFabServerAPI.cs +++ b/PlayFabServerSDK/source/PlayFabServerAPI.cs @@ -138,6 +138,31 @@ public static async Task> DeleteUsersAsync(Dele return new PlayFabResult { Result = result }; } + /// + /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + /// + public static async Task> GetFriendLeaderboardAsync(GetFriendLeaderboardRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendLeaderboard", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetLeaderboardResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -188,6 +213,29 @@ public static async Task> GetLeade return new PlayFabResult { Result = result }; } + + public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetPlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -363,6 +411,29 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } + + public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UpdatePlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UpdatePlayerStatisticsResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// @@ -1088,6 +1159,81 @@ public static async Task> Updat return new PlayFabResult { Result = result }; } + /// + /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public static async Task> AddFriendAsync(AddFriendRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/AddFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + EmptyResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public static async Task> GetFriendsListAsync(GetFriendsListRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendsList", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetFriendsListResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// Removes the specified friend from the the user's friend list + /// + public static async Task> RemoveFriendAsync(RemoveFriendRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/RemoveFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + EmptyResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Informs the PlayFab match-making service that the user specified has left the Game Server Instance /// From 9cc9e433738c137e63e9ef299e55ca352f5eee2f Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 21 Dec 2015 23:03:17 +0000 Subject: [PATCH 03/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 46 ------ PlayFabSDK/source/PlayFabAdminAPI.cs | 165 -------------------- PlayFabSDK/source/PlayFabClientAPI.cs | 46 ------ PlayFabSDK/source/PlayFabServerAPI.cs | 146 ----------------- PlayFabServerSDK/source/PlayFabAdminAPI.cs | 165 -------------------- PlayFabServerSDK/source/PlayFabServerAPI.cs | 146 ----------------- 6 files changed, 714 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 5e6814ba..26cbed69 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -1251,29 +1251,6 @@ public static async Task> G return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) - { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -1399,29 +1376,6 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } - - public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) - { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Creates and updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabAdminAPI.cs b/PlayFabSDK/source/PlayFabAdminAPI.cs index 3f7ba4b5..600321c0 100644 --- a/PlayFabSDK/source/PlayFabAdminAPI.cs +++ b/PlayFabSDK/source/PlayFabAdminAPI.cs @@ -113,29 +113,6 @@ public static async Task> Update return new PlayFabResult { Result = result }; } - - public static async Task> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - CreatePlayerStatisticDefinitionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. /// @@ -186,52 +163,6 @@ public static async Task> GetDataReportAsync( return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticDefinitionsAsync(GetPlayerStatisticDefinitionsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticDefinitionsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - - public static async Task> GetPlayerStatisticVersionsAsync(GetPlayerStatisticVersionsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticVersionsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -382,54 +313,6 @@ public static async Task> GetUserReadOnlyDataAs return new PlayFabResult { Result = result }; } - - public static async Task> IncrementPlayerStatisticVersionAsync(IncrementPlayerStatisticVersionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - IncrementPlayerStatisticVersionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Attempts to process an order refund through the original real money payment provider. - /// - public static async Task> RefundPurchaseAsync(RefundPurchaseRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/RefundPurchase", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - RefundPurchaseResponse result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Completely removes all statistics for the specified user, for the current game /// @@ -455,54 +338,6 @@ public static async Task> ResetUserStat return new PlayFabResult { Result = result }; } - /// - /// Attempts to resolve a dispute with the original order's payment provider. - /// - public static async Task> ResolvePurchaseDisputeAsync(ResolvePurchaseDisputeRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/ResolvePurchaseDispute", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - ResolvePurchaseDisputeResponse result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - - public static async Task> UpdatePlayerStatisticDefinitionAsync(UpdatePlayerStatisticDefinitionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticDefinitionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 5e6814ba..26cbed69 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -1251,29 +1251,6 @@ public static async Task> G return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) - { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -1399,29 +1376,6 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } - - public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) - { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Creates and updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabSDK/source/PlayFabServerAPI.cs b/PlayFabSDK/source/PlayFabServerAPI.cs index 05cd6a8b..a824a114 100644 --- a/PlayFabSDK/source/PlayFabServerAPI.cs +++ b/PlayFabSDK/source/PlayFabServerAPI.cs @@ -138,31 +138,6 @@ public static async Task> DeleteUsersAsync(Dele return new PlayFabResult { Result = result }; } - /// - /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - /// - public static async Task> GetFriendLeaderboardAsync(GetFriendLeaderboardRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendLeaderboard", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetLeaderboardResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -213,29 +188,6 @@ public static async Task> GetLeade return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -411,29 +363,6 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } - - public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UpdatePlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// @@ -1159,81 +1088,6 @@ public static async Task> Updat return new PlayFabResult { Result = result }; } - /// - /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - /// - public static async Task> AddFriendAsync(AddFriendRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/AddFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - EmptyResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - /// - public static async Task> GetFriendsListAsync(GetFriendsListRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendsList", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetFriendsListResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Removes the specified friend from the the user's friend list - /// - public static async Task> RemoveFriendAsync(RemoveFriendRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/RemoveFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - EmptyResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Informs the PlayFab match-making service that the user specified has left the Game Server Instance /// diff --git a/PlayFabServerSDK/source/PlayFabAdminAPI.cs b/PlayFabServerSDK/source/PlayFabAdminAPI.cs index 3f7ba4b5..600321c0 100644 --- a/PlayFabServerSDK/source/PlayFabAdminAPI.cs +++ b/PlayFabServerSDK/source/PlayFabAdminAPI.cs @@ -113,29 +113,6 @@ public static async Task> Update return new PlayFabResult { Result = result }; } - - public static async Task> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - CreatePlayerStatisticDefinitionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. /// @@ -186,52 +163,6 @@ public static async Task> GetDataReportAsync( return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticDefinitionsAsync(GetPlayerStatisticDefinitionsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticDefinitionsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - - public static async Task> GetPlayerStatisticVersionsAsync(GetPlayerStatisticVersionsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticVersionsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -382,54 +313,6 @@ public static async Task> GetUserReadOnlyDataAs return new PlayFabResult { Result = result }; } - - public static async Task> IncrementPlayerStatisticVersionAsync(IncrementPlayerStatisticVersionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - IncrementPlayerStatisticVersionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Attempts to process an order refund through the original real money payment provider. - /// - public static async Task> RefundPurchaseAsync(RefundPurchaseRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/RefundPurchase", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - RefundPurchaseResponse result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Completely removes all statistics for the specified user, for the current game /// @@ -455,54 +338,6 @@ public static async Task> ResetUserStat return new PlayFabResult { Result = result }; } - /// - /// Attempts to resolve a dispute with the original order's payment provider. - /// - public static async Task> ResolvePurchaseDisputeAsync(ResolvePurchaseDisputeRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/ResolvePurchaseDispute", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - ResolvePurchaseDisputeResponse result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - - public static async Task> UpdatePlayerStatisticDefinitionAsync(UpdatePlayerStatisticDefinitionRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticDefinitionResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// diff --git a/PlayFabServerSDK/source/PlayFabServerAPI.cs b/PlayFabServerSDK/source/PlayFabServerAPI.cs index 05cd6a8b..a824a114 100644 --- a/PlayFabServerSDK/source/PlayFabServerAPI.cs +++ b/PlayFabServerSDK/source/PlayFabServerAPI.cs @@ -138,31 +138,6 @@ public static async Task> DeleteUsersAsync(Dele return new PlayFabResult { Result = result }; } - /// - /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - /// - public static async Task> GetFriendLeaderboardAsync(GetFriendLeaderboardRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendLeaderboard", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetLeaderboardResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -213,29 +188,6 @@ public static async Task> GetLeade return new PlayFabResult { Result = result }; } - - public static async Task> GetPlayerStatisticsAsync(GetPlayerStatisticsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetPlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -411,29 +363,6 @@ public static async Task> GetUserStatisti return new PlayFabResult { Result = result }; } - - public static async Task> UpdatePlayerStatisticsAsync(UpdatePlayerStatisticsRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UpdatePlayerStatistics", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - UpdatePlayerStatisticsResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Updates the title-specific custom data for the user which is readable and writable by the client /// @@ -1159,81 +1088,6 @@ public static async Task> Updat return new PlayFabResult { Result = result }; } - /// - /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - /// - public static async Task> AddFriendAsync(AddFriendRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/AddFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - EmptyResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - /// - public static async Task> GetFriendsListAsync(GetFriendsListRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/GetFriendsList", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - GetFriendsListResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - - /// - /// Removes the specified friend from the the user's friend list - /// - public static async Task> RemoveFriendAsync(RemoveFriendRequest request) - { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/RemoveFriend", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - if(httpResult is PlayFabError) - { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler(error); - return new PlayFabResult { Error = error, }; - } - string resultRawJson = (string)httpResult; - - var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); - var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); - - EmptyResult result = resultData.data; - - return new PlayFabResult { Result = result }; - } - /// /// Informs the PlayFab match-making service that the user specified has left the Game Server Instance /// From 61636e345040aef114b4102ed9e46086b0dfcf59 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Wed, 23 Dec 2015 17:39:57 +0000 Subject: [PATCH 04/11] Automated build from Jenkins --- .../source/PlayFabClientModels.cs | 93 +++++++++++++++++++ PlayFabSDK/source/PlayFabAdminModels.cs | 14 ++- PlayFabSDK/source/PlayFabClientModels.cs | 93 +++++++++++++++++++ PlayFabSDK/source/PlayFabMatchmakerModels.cs | 3 + PlayFabSDK/source/PlayFabServerAPI.cs | 2 +- PlayFabSDK/source/PlayFabServerModels.cs | 24 +++++ PlayFabServerSDK/source/PlayFabAdminModels.cs | 14 ++- .../source/PlayFabMatchmakerModels.cs | 3 + PlayFabServerSDK/source/PlayFabServerAPI.cs | 2 +- .../source/PlayFabServerModels.cs | 24 +++++ 10 files changed, 268 insertions(+), 4 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index cb136722..9615e8d8 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -36,6 +36,9 @@ public class AcceptTradeResponse { + /// + /// Details about trade which was just accepted. + /// public TradeInfo Trade { get; set;} @@ -250,6 +253,9 @@ public class CancelTradeResponse { + /// + /// Details about trade which was just canceled. + /// public TradeInfo Trade { get; set;} @@ -538,10 +544,19 @@ public class CharacterResult { + /// + /// The id for this character on this player. + /// public string CharacterId { get; set;} + /// + /// The name of this character. + /// public string CharacterName { get; set;} + /// + /// The type-string that was given to this character on creation. + /// public string CharacterType { get; set;} @@ -1657,6 +1672,9 @@ public class GetPhotonAuthenticationTokenRequest { + /// + /// The Photon applicationId for the game you wish to log into. + /// public string PhotonApplicationId { get; set;} @@ -1668,6 +1686,9 @@ public class GetPhotonAuthenticationTokenResult { + /// + /// The Photon authentication token for this game-session. + /// public string PhotonCustomAuthenticationToken { get; set;} @@ -1722,8 +1743,14 @@ public class GetPlayerTradesResponse { + /// + /// The trades for this player which are currently available to be accepted. + /// public List OpenedTrades { get; set;} + /// + /// History of trades which this player has accepted. + /// public List AcceptedTrades { get; set;} @@ -2113,6 +2140,9 @@ public class GetTradeStatusResponse { + /// + /// Information about the requested trade. + /// public TradeInfo Trade { get; set;} @@ -2396,6 +2426,9 @@ public class GrantCharacterToUserResult /// public string CharacterType { get; set;} + /// + /// Indicates whether this character was created successfully. + /// public bool Result { get; set;} @@ -2460,6 +2493,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2811,6 +2847,9 @@ public class ListUsersCharactersResult { + /// + /// The requested list of characters. + /// public List Characters { get; set;} @@ -3034,6 +3073,9 @@ public class LoginWithGoogleAccountRequest /// public bool? CreateAccount { get; set;} + /// + /// Deprecated - unused + /// public string PublisherId { get; set;} @@ -3366,6 +3408,9 @@ public class OpenTradeResponse { + /// + /// The information about the trade that was just opened. + /// public TradeInfo Trade { get; set;} @@ -3867,8 +3912,14 @@ public class ReportPlayerClientResult { + /// + /// Indicates whether this action completed successfully. + /// public bool Updated { get; set;} + /// + /// The number of remaining reports which may be filed today. + /// public int SubmissionsRemaining { get; set;} @@ -3981,6 +4032,9 @@ public class SendAccountRecoveryEmailRequest /// public string TitleId { get; set;} + /// + /// Deprecated - unused + /// public string PublisherId { get; set;} @@ -4351,31 +4405,70 @@ public class TradeInfo { + /// + /// Describes the current state of this trade. + /// [JsonConverter(typeof(StringEnumConverter))] public TradeStatus? Status { get; set;} + /// + /// The identifier for this trade. + /// public string TradeId { get; set;} + /// + /// The PlayFabId for the offering player. + /// public string OfferingPlayerId { get; set;} + /// + /// The itemInstance Ids that are being offered. + /// public List OfferedInventoryInstanceIds { get; set;} + /// + /// The catalogItem Ids of the item instances being offered. + /// public List OfferedCatalogItemIds { get; set;} + /// + /// The catalogItem Ids requested in exchange. + /// public List RequestedCatalogItemIds { get; set;} + /// + /// An optional list of players allowed to complete this trade. If null, anybody can complete the trade. + /// public List AllowedPlayerIds { get; set;} + /// + /// The PlayFab ID of the player who accepted the trade. If null, no one has accepted the trade. + /// public string AcceptedPlayerId { get; set;} + /// + /// Item instances from the accepting player that are used to fulfill the trade. If null, no one has accepted the trade. + /// public List AcceptedInventoryInstanceIds { get; set;} + /// + /// The UTC time when this trade was created. + /// public DateTime? OpenedAt { get; set;} + /// + /// If set, The UTC time when this trade was fulfilled. + /// public DateTime? FilledAt { get; set;} + /// + /// If set, The UTC time when this trade was canceled. + /// public DateTime? CancelledAt { get; set;} + /// + /// If set, The UTC time when this trade was made invalid. + /// public DateTime? InvalidatedAt { get; set;} diff --git a/PlayFabSDK/source/PlayFabAdminModels.cs b/PlayFabSDK/source/PlayFabAdminModels.cs index c20fe482..c60b462a 100644 --- a/PlayFabSDK/source/PlayFabAdminModels.cs +++ b/PlayFabSDK/source/PlayFabAdminModels.cs @@ -848,10 +848,13 @@ public class GetContentListResult public long ItemCount { get; set;} /// - /// The total size of listed contents in bytes + /// The total size of listed contents in bytes. /// public long TotalSize { get; set;} + /// + /// List of content items. + /// public List Contents { get; set;} @@ -925,6 +928,9 @@ public class GetDataReportResult { + /// + /// The URL where the requested report can be downloaded. + /// public string DownloadUrl { get; set;} @@ -1472,6 +1478,9 @@ public class GrantedItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -1664,6 +1673,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index cb136722..9615e8d8 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -36,6 +36,9 @@ public class AcceptTradeResponse { + /// + /// Details about trade which was just accepted. + /// public TradeInfo Trade { get; set;} @@ -250,6 +253,9 @@ public class CancelTradeResponse { + /// + /// Details about trade which was just canceled. + /// public TradeInfo Trade { get; set;} @@ -538,10 +544,19 @@ public class CharacterResult { + /// + /// The id for this character on this player. + /// public string CharacterId { get; set;} + /// + /// The name of this character. + /// public string CharacterName { get; set;} + /// + /// The type-string that was given to this character on creation. + /// public string CharacterType { get; set;} @@ -1657,6 +1672,9 @@ public class GetPhotonAuthenticationTokenRequest { + /// + /// The Photon applicationId for the game you wish to log into. + /// public string PhotonApplicationId { get; set;} @@ -1668,6 +1686,9 @@ public class GetPhotonAuthenticationTokenResult { + /// + /// The Photon authentication token for this game-session. + /// public string PhotonCustomAuthenticationToken { get; set;} @@ -1722,8 +1743,14 @@ public class GetPlayerTradesResponse { + /// + /// The trades for this player which are currently available to be accepted. + /// public List OpenedTrades { get; set;} + /// + /// History of trades which this player has accepted. + /// public List AcceptedTrades { get; set;} @@ -2113,6 +2140,9 @@ public class GetTradeStatusResponse { + /// + /// Information about the requested trade. + /// public TradeInfo Trade { get; set;} @@ -2396,6 +2426,9 @@ public class GrantCharacterToUserResult /// public string CharacterType { get; set;} + /// + /// Indicates whether this character was created successfully. + /// public bool Result { get; set;} @@ -2460,6 +2493,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2811,6 +2847,9 @@ public class ListUsersCharactersResult { + /// + /// The requested list of characters. + /// public List Characters { get; set;} @@ -3034,6 +3073,9 @@ public class LoginWithGoogleAccountRequest /// public bool? CreateAccount { get; set;} + /// + /// Deprecated - unused + /// public string PublisherId { get; set;} @@ -3366,6 +3408,9 @@ public class OpenTradeResponse { + /// + /// The information about the trade that was just opened. + /// public TradeInfo Trade { get; set;} @@ -3867,8 +3912,14 @@ public class ReportPlayerClientResult { + /// + /// Indicates whether this action completed successfully. + /// public bool Updated { get; set;} + /// + /// The number of remaining reports which may be filed today. + /// public int SubmissionsRemaining { get; set;} @@ -3981,6 +4032,9 @@ public class SendAccountRecoveryEmailRequest /// public string TitleId { get; set;} + /// + /// Deprecated - unused + /// public string PublisherId { get; set;} @@ -4351,31 +4405,70 @@ public class TradeInfo { + /// + /// Describes the current state of this trade. + /// [JsonConverter(typeof(StringEnumConverter))] public TradeStatus? Status { get; set;} + /// + /// The identifier for this trade. + /// public string TradeId { get; set;} + /// + /// The PlayFabId for the offering player. + /// public string OfferingPlayerId { get; set;} + /// + /// The itemInstance Ids that are being offered. + /// public List OfferedInventoryInstanceIds { get; set;} + /// + /// The catalogItem Ids of the item instances being offered. + /// public List OfferedCatalogItemIds { get; set;} + /// + /// The catalogItem Ids requested in exchange. + /// public List RequestedCatalogItemIds { get; set;} + /// + /// An optional list of players allowed to complete this trade. If null, anybody can complete the trade. + /// public List AllowedPlayerIds { get; set;} + /// + /// The PlayFab ID of the player who accepted the trade. If null, no one has accepted the trade. + /// public string AcceptedPlayerId { get; set;} + /// + /// Item instances from the accepting player that are used to fulfill the trade. If null, no one has accepted the trade. + /// public List AcceptedInventoryInstanceIds { get; set;} + /// + /// The UTC time when this trade was created. + /// public DateTime? OpenedAt { get; set;} + /// + /// If set, The UTC time when this trade was fulfilled. + /// public DateTime? FilledAt { get; set;} + /// + /// If set, The UTC time when this trade was canceled. + /// public DateTime? CancelledAt { get; set;} + /// + /// If set, The UTC time when this trade was made invalid. + /// public DateTime? InvalidatedAt { get; set;} diff --git a/PlayFabSDK/source/PlayFabMatchmakerModels.cs b/PlayFabSDK/source/PlayFabMatchmakerModels.cs index 334b0c98..e9ef4184 100644 --- a/PlayFabSDK/source/PlayFabMatchmakerModels.cs +++ b/PlayFabSDK/source/PlayFabMatchmakerModels.cs @@ -98,6 +98,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// diff --git a/PlayFabSDK/source/PlayFabServerAPI.cs b/PlayFabSDK/source/PlayFabServerAPI.cs index a824a114..3bdfb4b2 100644 --- a/PlayFabSDK/source/PlayFabServerAPI.cs +++ b/PlayFabSDK/source/PlayFabServerAPI.cs @@ -989,7 +989,7 @@ public static async Task> RedeemCouponAsync(Re } /// - /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially poxic players. + /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially toxic players. /// public static async Task> ReportPlayerAsync(ReportPlayerServerRequest request) { diff --git a/PlayFabSDK/source/PlayFabServerModels.cs b/PlayFabSDK/source/PlayFabServerModels.cs index 4795af2d..650541ff 100644 --- a/PlayFabSDK/source/PlayFabServerModels.cs +++ b/PlayFabSDK/source/PlayFabServerModels.cs @@ -435,10 +435,19 @@ public class CharacterResult { + /// + /// The id for this character on this player. + /// public string CharacterId { get; set;} + /// + /// The name of this character. + /// public string CharacterName { get; set;} + /// + /// The type-string that was given to this character on creation. + /// public string CharacterType { get; set;} @@ -1764,6 +1773,9 @@ public class GrantedItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2009,6 +2021,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2061,6 +2076,9 @@ public class ListUsersCharactersResult { + /// + /// The requested list of characters. + /// public List Characters { get; set;} @@ -2551,8 +2569,14 @@ public class ReportPlayerServerResult { + /// + /// Indicates whether this action completed successfully. + /// public bool Updated { get; set;} + /// + /// The number of remaining reports which may be filed today by this reporting player. + /// public int SubmissionsRemaining { get; set;} diff --git a/PlayFabServerSDK/source/PlayFabAdminModels.cs b/PlayFabServerSDK/source/PlayFabAdminModels.cs index c20fe482..c60b462a 100644 --- a/PlayFabServerSDK/source/PlayFabAdminModels.cs +++ b/PlayFabServerSDK/source/PlayFabAdminModels.cs @@ -848,10 +848,13 @@ public class GetContentListResult public long ItemCount { get; set;} /// - /// The total size of listed contents in bytes + /// The total size of listed contents in bytes. /// public long TotalSize { get; set;} + /// + /// List of content items. + /// public List Contents { get; set;} @@ -925,6 +928,9 @@ public class GetDataReportResult { + /// + /// The URL where the requested report can be downloaded. + /// public string DownloadUrl { get; set;} @@ -1472,6 +1478,9 @@ public class GrantedItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -1664,6 +1673,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// diff --git a/PlayFabServerSDK/source/PlayFabMatchmakerModels.cs b/PlayFabServerSDK/source/PlayFabMatchmakerModels.cs index 334b0c98..e9ef4184 100644 --- a/PlayFabServerSDK/source/PlayFabMatchmakerModels.cs +++ b/PlayFabServerSDK/source/PlayFabMatchmakerModels.cs @@ -98,6 +98,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// diff --git a/PlayFabServerSDK/source/PlayFabServerAPI.cs b/PlayFabServerSDK/source/PlayFabServerAPI.cs index a824a114..3bdfb4b2 100644 --- a/PlayFabServerSDK/source/PlayFabServerAPI.cs +++ b/PlayFabServerSDK/source/PlayFabServerAPI.cs @@ -989,7 +989,7 @@ public static async Task> RedeemCouponAsync(Re } /// - /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially poxic players. + /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially toxic players. /// public static async Task> ReportPlayerAsync(ReportPlayerServerRequest request) { diff --git a/PlayFabServerSDK/source/PlayFabServerModels.cs b/PlayFabServerSDK/source/PlayFabServerModels.cs index 4795af2d..650541ff 100644 --- a/PlayFabServerSDK/source/PlayFabServerModels.cs +++ b/PlayFabServerSDK/source/PlayFabServerModels.cs @@ -435,10 +435,19 @@ public class CharacterResult { + /// + /// The id for this character on this player. + /// public string CharacterId { get; set;} + /// + /// The name of this character. + /// public string CharacterName { get; set;} + /// + /// The type-string that was given to this character on creation. + /// public string CharacterType { get; set;} @@ -1764,6 +1773,9 @@ public class GrantedItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2009,6 +2021,9 @@ public class ItemInstance : IComparable /// public string BundleParent { get; set;} + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// public string DisplayName { get; set;} /// @@ -2061,6 +2076,9 @@ public class ListUsersCharactersResult { + /// + /// The requested list of characters. + /// public List Characters { get; set;} @@ -2551,8 +2569,14 @@ public class ReportPlayerServerResult { + /// + /// Indicates whether this action completed successfully. + /// public bool Updated { get; set;} + /// + /// The number of remaining reports which may be filed today by this reporting player. + /// public int SubmissionsRemaining { get; set;} From ceb269fab213c3dc217267fc7c31a5591b56ebdd Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 4 Jan 2016 19:09:48 +0000 Subject: [PATCH 05/11] Automated build from Jenkins --- PlayFabSDK/source/PlayFabAdminModels.cs | 4 ++-- PlayFabServerSDK/source/PlayFabAdminModels.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PlayFabSDK/source/PlayFabAdminModels.cs b/PlayFabSDK/source/PlayFabAdminModels.cs index c60b462a..1519d6dc 100644 --- a/PlayFabSDK/source/PlayFabAdminModels.cs +++ b/PlayFabSDK/source/PlayFabAdminModels.cs @@ -2566,12 +2566,12 @@ public class UpdateCatalogItemsRequest /// - /// which catalog is being updated + /// Which catalog is being updated /// public string CatalogVersion { get; set;} /// - /// array of catalog items to be submitted + /// Array of catalog items to be submitted. Note that while CatalogItem has a parameter for CatalogVersion, it is not required and ignored in this call. /// public List Catalog { get; set;} diff --git a/PlayFabServerSDK/source/PlayFabAdminModels.cs b/PlayFabServerSDK/source/PlayFabAdminModels.cs index c60b462a..1519d6dc 100644 --- a/PlayFabServerSDK/source/PlayFabAdminModels.cs +++ b/PlayFabServerSDK/source/PlayFabAdminModels.cs @@ -2566,12 +2566,12 @@ public class UpdateCatalogItemsRequest /// - /// which catalog is being updated + /// Which catalog is being updated /// public string CatalogVersion { get; set;} /// - /// array of catalog items to be submitted + /// Array of catalog items to be submitted. Note that while CatalogItem has a parameter for CatalogVersion, it is not required and ignored in this call. /// public List Catalog { get; set;} From a066e4c09b7a530232c8c3eec3b2e5d4979a8f6f Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 8 Jan 2016 20:10:28 +0000 Subject: [PATCH 06/11] Automated build from Jenkins --- .../source/PlayFabClientModels.cs | 2 +- PlayFabClientSDK/source/PlayFabErrors.cs | 4 ++- PlayFabSDK/source/PlayFabAdminModels.cs | 29 ++++++++++++------- PlayFabSDK/source/PlayFabClientModels.cs | 2 +- PlayFabSDK/source/PlayFabErrors.cs | 4 ++- PlayFabSDK/source/PlayFabServerModels.cs | 2 +- PlayFabServerSDK/source/PlayFabAdminModels.cs | 29 ++++++++++++------- PlayFabServerSDK/source/PlayFabErrors.cs | 4 ++- .../source/PlayFabServerModels.cs | 2 +- 9 files changed, 51 insertions(+), 27 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index 9615e8d8..593ba0b0 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -4253,7 +4253,7 @@ public class StatisticUpdate /// /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when setting the statistic value for the first time. /// - public string Version { get; set;} + public uint? Version { get; set;} /// /// statistic value for the player diff --git a/PlayFabClientSDK/source/PlayFabErrors.cs b/PlayFabClientSDK/source/PlayFabErrors.cs index 6d15d61c..099692de 100644 --- a/PlayFabClientSDK/source/PlayFabErrors.cs +++ b/PlayFabClientSDK/source/PlayFabErrors.cs @@ -197,7 +197,9 @@ public enum PlayFabErrorCode InvalidPartnerResponse = 1193, APINotEnabledForGameServerAccess = 1194, StatisticNotFound = 1195, - StatisticNameConflict = 1196 + StatisticNameConflict = 1196, + StatisticVersionClosedForWrites = 1197, + StatisticVersionInvalid = 1198 } public class PlayFabError diff --git a/PlayFabSDK/source/PlayFabAdminModels.cs b/PlayFabSDK/source/PlayFabAdminModels.cs index 1519d6dc..8c45b15e 100644 --- a/PlayFabSDK/source/PlayFabAdminModels.cs +++ b/PlayFabSDK/source/PlayFabAdminModels.cs @@ -1971,7 +1971,7 @@ public class PlayerStatisticDefinition /// /// current active version of the statistic, incremented each time the statistic resets /// - public string CurrentVersion { get; set;} + public uint CurrentVersion { get; set;} /// /// interval at which the values of the statistic for all players are reset @@ -1996,29 +1996,38 @@ public class PlayerStatisticVersion /// /// version of the statistic /// - public string Version { get; set;} + public uint Version { get; set;} /// - /// time for which the statistic version was scheduled to become active, based on the configured ResetInterval + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval /// - public DateTime? ScheduledVersionChangeIntervalTime { get; set;} + public DateTime? ScheduledActivationTime { get; set;} /// /// time when the statistic version became active /// - public DateTime CreatedTime { get; set;} + public DateTime ActivationTime { get; set;} /// - /// status of the process of saving player statistic values of the previous version to a downloadable archive, if configured + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime { get; set;} + + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime { get; set;} + + /// + /// status of the process of saving player statistic values of the previous version to a downloadable archive /// [JsonConverter(typeof(StringEnumConverter))] public StatisticVersionArchivalStatus? ArchivalStatus { get; set;} /// - /// reset interval that triggered the version to become active, if configured + /// URL for the downloadable archive of player statistic values, if available /// - [JsonConverter(typeof(StringEnumConverter))] - public Interval? ResetInterval { get; set;} + public string ArchiveDownloadUrl { get; set;} } @@ -2485,8 +2494,8 @@ public enum StatisticVersionArchivalStatus { NotScheduled, Scheduled, + Queued, InProgress, - Failed, Complete } diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index 9615e8d8..593ba0b0 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -4253,7 +4253,7 @@ public class StatisticUpdate /// /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when setting the statistic value for the first time. /// - public string Version { get; set;} + public uint? Version { get; set;} /// /// statistic value for the player diff --git a/PlayFabSDK/source/PlayFabErrors.cs b/PlayFabSDK/source/PlayFabErrors.cs index 6d15d61c..099692de 100644 --- a/PlayFabSDK/source/PlayFabErrors.cs +++ b/PlayFabSDK/source/PlayFabErrors.cs @@ -197,7 +197,9 @@ public enum PlayFabErrorCode InvalidPartnerResponse = 1193, APINotEnabledForGameServerAccess = 1194, StatisticNotFound = 1195, - StatisticNameConflict = 1196 + StatisticNameConflict = 1196, + StatisticVersionClosedForWrites = 1197, + StatisticVersionInvalid = 1198 } public class PlayFabError diff --git a/PlayFabSDK/source/PlayFabServerModels.cs b/PlayFabSDK/source/PlayFabServerModels.cs index 650541ff..a62da2e4 100644 --- a/PlayFabSDK/source/PlayFabServerModels.cs +++ b/PlayFabSDK/source/PlayFabServerModels.cs @@ -2715,7 +2715,7 @@ public class StatisticUpdate /// /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when setting the statistic value for the first time. /// - public string Version { get; set;} + public uint? Version { get; set;} /// /// statistic value for the player diff --git a/PlayFabServerSDK/source/PlayFabAdminModels.cs b/PlayFabServerSDK/source/PlayFabAdminModels.cs index 1519d6dc..8c45b15e 100644 --- a/PlayFabServerSDK/source/PlayFabAdminModels.cs +++ b/PlayFabServerSDK/source/PlayFabAdminModels.cs @@ -1971,7 +1971,7 @@ public class PlayerStatisticDefinition /// /// current active version of the statistic, incremented each time the statistic resets /// - public string CurrentVersion { get; set;} + public uint CurrentVersion { get; set;} /// /// interval at which the values of the statistic for all players are reset @@ -1996,29 +1996,38 @@ public class PlayerStatisticVersion /// /// version of the statistic /// - public string Version { get; set;} + public uint Version { get; set;} /// - /// time for which the statistic version was scheduled to become active, based on the configured ResetInterval + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval /// - public DateTime? ScheduledVersionChangeIntervalTime { get; set;} + public DateTime? ScheduledActivationTime { get; set;} /// /// time when the statistic version became active /// - public DateTime CreatedTime { get; set;} + public DateTime ActivationTime { get; set;} /// - /// status of the process of saving player statistic values of the previous version to a downloadable archive, if configured + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime { get; set;} + + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime { get; set;} + + /// + /// status of the process of saving player statistic values of the previous version to a downloadable archive /// [JsonConverter(typeof(StringEnumConverter))] public StatisticVersionArchivalStatus? ArchivalStatus { get; set;} /// - /// reset interval that triggered the version to become active, if configured + /// URL for the downloadable archive of player statistic values, if available /// - [JsonConverter(typeof(StringEnumConverter))] - public Interval? ResetInterval { get; set;} + public string ArchiveDownloadUrl { get; set;} } @@ -2485,8 +2494,8 @@ public enum StatisticVersionArchivalStatus { NotScheduled, Scheduled, + Queued, InProgress, - Failed, Complete } diff --git a/PlayFabServerSDK/source/PlayFabErrors.cs b/PlayFabServerSDK/source/PlayFabErrors.cs index 6d15d61c..099692de 100644 --- a/PlayFabServerSDK/source/PlayFabErrors.cs +++ b/PlayFabServerSDK/source/PlayFabErrors.cs @@ -197,7 +197,9 @@ public enum PlayFabErrorCode InvalidPartnerResponse = 1193, APINotEnabledForGameServerAccess = 1194, StatisticNotFound = 1195, - StatisticNameConflict = 1196 + StatisticNameConflict = 1196, + StatisticVersionClosedForWrites = 1197, + StatisticVersionInvalid = 1198 } public class PlayFabError diff --git a/PlayFabServerSDK/source/PlayFabServerModels.cs b/PlayFabServerSDK/source/PlayFabServerModels.cs index 650541ff..a62da2e4 100644 --- a/PlayFabServerSDK/source/PlayFabServerModels.cs +++ b/PlayFabServerSDK/source/PlayFabServerModels.cs @@ -2715,7 +2715,7 @@ public class StatisticUpdate /// /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when setting the statistic value for the first time. /// - public string Version { get; set;} + public uint? Version { get; set;} /// /// statistic value for the player From b978757387cb19cd935f792a21b9d575f8bf12e4 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 8 Jan 2016 20:46:43 +0000 Subject: [PATCH 07/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientModels.cs | 2 +- PlayFabSDK/source/PlayFabClientModels.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index 593ba0b0..cd01e813 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -3265,7 +3265,7 @@ public class MatchmakeRequest /// region to match make against /// [JsonConverter(typeof(StringEnumConverter))] - public Region? Region { get; set;} + public Region Region { get; set;} /// /// game mode to match make against diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index 593ba0b0..cd01e813 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -3265,7 +3265,7 @@ public class MatchmakeRequest /// region to match make against /// [JsonConverter(typeof(StringEnumConverter))] - public Region? Region { get; set;} + public Region Region { get; set;} /// /// game mode to match make against From 30b56a4565f57dfc1167e38d60f900617f4bb433 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Thu, 14 Jan 2016 00:03:59 +0000 Subject: [PATCH 08/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 52 +++++++- .../source/PlayFabClientModels.cs | 112 ++++++++++++++++-- PlayFabSDK/source/PlayFabClientAPI.cs | 52 +++++++- PlayFabSDK/source/PlayFabClientModels.cs | 112 ++++++++++++++++-- 4 files changed, 300 insertions(+), 28 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 26cbed69..50384a48 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -1201,6 +1201,31 @@ public static async Task { Result = result }; } + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab user. If PlayFabId is empty or null will return currently logged in user. + /// + public static async Task> GetFriendLeaderboardAroundPlayerAsync(GetFriendLeaderboardAroundPlayerRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetFriendLeaderboardAroundPlayer", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetFriendLeaderboardAroundPlayerResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -1251,6 +1276,31 @@ public static async Task> G return new PlayFabResult { Result = result }; } + /// + /// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user. + /// + public static async Task> GetLeaderboardAroundPlayerAsync(GetLeaderboardAroundPlayerRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetLeaderboardAroundPlayer", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetLeaderboardAroundPlayerResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -2553,7 +2603,7 @@ public static async Task> GetCharac } /// - /// Retrieves a list of ranked characters for the given statistic, centered on the currently signed-in user + /// Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID /// public static async Task> GetLeaderboardAroundCharacterAsync(GetLeaderboardAroundCharacterRequest request) { diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index cd01e813..8b886ae2 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -1317,9 +1317,9 @@ public class GetCharacterLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1421,9 +1421,9 @@ public class GetFriendLeaderboardAroundCurrentUserRequest public string StatisticName { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} /// /// Indicates whether Steam service friends should be included in the response. Default is true. @@ -1454,6 +1454,54 @@ public class GetFriendLeaderboardAroundCurrentUserResult + public class GetFriendLeaderboardAroundPlayerRequest + { + + + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName { get; set;} + + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount { get; set;} + + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId { get; set;} + + /// + /// Indicates whether Steam service friends should be included in the response. Default is true. + /// + public bool? IncludeSteamFriends { get; set;} + + /// + /// Indicates whether Facebook friends should be included in the response. Default is true. + /// + public bool? IncludeFacebookFriends { get; set;} + + + } + + + + public class GetFriendLeaderboardAroundPlayerResult + { + + + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard { get; set;} + + + } + + + public class GetFriendLeaderboardRequest { @@ -1469,9 +1517,9 @@ public class GetFriendLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} /// /// Indicates whether Steam service friends should be included in the response. Default is true. @@ -1531,7 +1579,7 @@ public class GetLeaderboardAroundCharacterRequest public string StatisticName { get; set;} /// - /// Unique PlayFab assigned ID for a specific character owned by a user + /// Unique PlayFab assigned ID for a specific character on which to center the leaderboard. /// public string CharacterId { get; set;} @@ -1541,9 +1589,9 @@ public class GetLeaderboardAroundCharacterRequest public string CharacterType { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1574,9 +1622,9 @@ public class GetLeaderboardAroundCurrentUserRequest public string StatisticName { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1597,6 +1645,44 @@ public class GetLeaderboardAroundCurrentUserResult + public class GetLeaderboardAroundPlayerRequest + { + + + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId { get; set;} + + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName { get; set;} + + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount { get; set;} + + + } + + + + public class GetLeaderboardAroundPlayerResult + { + + + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard { get; set;} + + + } + + + public class GetLeaderboardForUsersCharactersRequest { @@ -1645,9 +1731,9 @@ public class GetLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 26cbed69..50384a48 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -1201,6 +1201,31 @@ public static async Task { Result = result }; } + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab user. If PlayFabId is empty or null will return currently logged in user. + /// + public static async Task> GetFriendLeaderboardAroundPlayerAsync(GetFriendLeaderboardAroundPlayerRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetFriendLeaderboardAroundPlayer", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetFriendLeaderboardAroundPlayerResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard /// @@ -1251,6 +1276,31 @@ public static async Task> G return new PlayFabResult { Result = result }; } + /// + /// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user. + /// + public static async Task> GetLeaderboardAroundPlayerAsync(GetLeaderboardAroundPlayerRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetLeaderboardAroundPlayer", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + GetLeaderboardAroundPlayerResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Retrieves the title-specific custom data for the user which is readable and writable by the client /// @@ -2553,7 +2603,7 @@ public static async Task> GetCharac } /// - /// Retrieves a list of ranked characters for the given statistic, centered on the currently signed-in user + /// Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID /// public static async Task> GetLeaderboardAroundCharacterAsync(GetLeaderboardAroundCharacterRequest request) { diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index cd01e813..8b886ae2 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -1317,9 +1317,9 @@ public class GetCharacterLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1421,9 +1421,9 @@ public class GetFriendLeaderboardAroundCurrentUserRequest public string StatisticName { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} /// /// Indicates whether Steam service friends should be included in the response. Default is true. @@ -1454,6 +1454,54 @@ public class GetFriendLeaderboardAroundCurrentUserResult + public class GetFriendLeaderboardAroundPlayerRequest + { + + + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName { get; set;} + + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount { get; set;} + + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId { get; set;} + + /// + /// Indicates whether Steam service friends should be included in the response. Default is true. + /// + public bool? IncludeSteamFriends { get; set;} + + /// + /// Indicates whether Facebook friends should be included in the response. Default is true. + /// + public bool? IncludeFacebookFriends { get; set;} + + + } + + + + public class GetFriendLeaderboardAroundPlayerResult + { + + + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard { get; set;} + + + } + + + public class GetFriendLeaderboardRequest { @@ -1469,9 +1517,9 @@ public class GetFriendLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} /// /// Indicates whether Steam service friends should be included in the response. Default is true. @@ -1531,7 +1579,7 @@ public class GetLeaderboardAroundCharacterRequest public string StatisticName { get; set;} /// - /// Unique PlayFab assigned ID for a specific character owned by a user + /// Unique PlayFab assigned ID for a specific character on which to center the leaderboard. /// public string CharacterId { get; set;} @@ -1541,9 +1589,9 @@ public class GetLeaderboardAroundCharacterRequest public string CharacterType { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1574,9 +1622,9 @@ public class GetLeaderboardAroundCurrentUserRequest public string StatisticName { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } @@ -1597,6 +1645,44 @@ public class GetLeaderboardAroundCurrentUserResult + public class GetLeaderboardAroundPlayerRequest + { + + + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId { get; set;} + + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName { get; set;} + + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount { get; set;} + + + } + + + + public class GetLeaderboardAroundPlayerResult + { + + + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard { get; set;} + + + } + + + public class GetLeaderboardForUsersCharactersRequest { @@ -1645,9 +1731,9 @@ public class GetLeaderboardRequest public int StartPosition { get; set;} /// - /// Maximum number of entries to retrieve. + /// Maximum number of entries to retrieve. Default 10, maximum 100. /// - public int MaxResultsCount { get; set;} + public int? MaxResultsCount { get; set;} } From ea1349fe9ef008462b71320f0455dce533c2703b Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Thu, 14 Jan 2016 22:21:02 +0000 Subject: [PATCH 09/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 2 +- PlayFabClientSDK/source/PlayFabClientModels.cs | 8 ++++---- PlayFabSDK/source/PlayFabClientAPI.cs | 2 +- PlayFabSDK/source/PlayFabClientModels.cs | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 50384a48..128c4d80 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -2152,7 +2152,7 @@ public static async Task> GetGameServerRe } /// - /// Attempts to locate a game session matching the given parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be GameNotFound. Note that EnableQueue is deprecated at this time. + /// Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be GameNotFound. Note that EnableQueue is deprecated at this time. /// public static async Task> MatchmakeAsync(MatchmakeRequest request) { diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index 8b886ae2..6e7eef62 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -3343,18 +3343,18 @@ public class MatchmakeRequest /// - /// build version to match against + /// build version to match against [Note: Required if LobbyId is not specified] /// public string BuildVersion { get; set;} /// - /// region to match make against + /// region to match make against [Note: Required if LobbyId is not specified] /// [JsonConverter(typeof(StringEnumConverter))] - public Region Region { get; set;} + public Region? Region { get; set;} /// - /// game mode to match make against + /// game mode to match make against [Note: Required if LobbyId is not specified] /// public string GameMode { get; set;} diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 50384a48..128c4d80 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -2152,7 +2152,7 @@ public static async Task> GetGameServerRe } /// - /// Attempts to locate a game session matching the given parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be GameNotFound. Note that EnableQueue is deprecated at this time. + /// Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be GameNotFound. Note that EnableQueue is deprecated at this time. /// public static async Task> MatchmakeAsync(MatchmakeRequest request) { diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index 8b886ae2..6e7eef62 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -3343,18 +3343,18 @@ public class MatchmakeRequest /// - /// build version to match against + /// build version to match against [Note: Required if LobbyId is not specified] /// public string BuildVersion { get; set;} /// - /// region to match make against + /// region to match make against [Note: Required if LobbyId is not specified] /// [JsonConverter(typeof(StringEnumConverter))] - public Region Region { get; set;} + public Region? Region { get; set;} /// - /// game mode to match make against + /// game mode to match make against [Note: Required if LobbyId is not specified] /// public string GameMode { get; set;} From 8f346e7e74bd0ce5ee5f03ca74e40e82d2b812e2 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 15 Jan 2016 00:37:45 +0000 Subject: [PATCH 10/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabErrors.cs | 3 ++- PlayFabSDK/source/PlayFabErrors.cs | 3 ++- PlayFabServerSDK/source/PlayFabErrors.cs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabErrors.cs b/PlayFabClientSDK/source/PlayFabErrors.cs index 099692de..1ad84847 100644 --- a/PlayFabClientSDK/source/PlayFabErrors.cs +++ b/PlayFabClientSDK/source/PlayFabErrors.cs @@ -199,7 +199,8 @@ public enum PlayFabErrorCode StatisticNotFound = 1195, StatisticNameConflict = 1196, StatisticVersionClosedForWrites = 1197, - StatisticVersionInvalid = 1198 + StatisticVersionInvalid = 1198, + APIClientRequestRateLimitExceeded = 1199 } public class PlayFabError diff --git a/PlayFabSDK/source/PlayFabErrors.cs b/PlayFabSDK/source/PlayFabErrors.cs index 099692de..1ad84847 100644 --- a/PlayFabSDK/source/PlayFabErrors.cs +++ b/PlayFabSDK/source/PlayFabErrors.cs @@ -199,7 +199,8 @@ public enum PlayFabErrorCode StatisticNotFound = 1195, StatisticNameConflict = 1196, StatisticVersionClosedForWrites = 1197, - StatisticVersionInvalid = 1198 + StatisticVersionInvalid = 1198, + APIClientRequestRateLimitExceeded = 1199 } public class PlayFabError diff --git a/PlayFabServerSDK/source/PlayFabErrors.cs b/PlayFabServerSDK/source/PlayFabErrors.cs index 099692de..1ad84847 100644 --- a/PlayFabServerSDK/source/PlayFabErrors.cs +++ b/PlayFabServerSDK/source/PlayFabErrors.cs @@ -199,7 +199,8 @@ public enum PlayFabErrorCode StatisticNotFound = 1195, StatisticNameConflict = 1196, StatisticVersionClosedForWrites = 1197, - StatisticVersionInvalid = 1198 + StatisticVersionInvalid = 1198, + APIClientRequestRateLimitExceeded = 1199 } public class PlayFabError From a8d090641a43970d1a7cf30382aa84cff572123e Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 18 Jan 2016 17:08:52 +0000 Subject: [PATCH 11/11] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabVersion.cs | 2 +- PlayFabSDK/source/PlayFabVersion.cs | 2 +- PlayFabServerSDK/source/PlayFabVersion.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabVersion.cs b/PlayFabClientSDK/source/PlayFabVersion.cs index a94892a0..2d2f9c60 100644 --- a/PlayFabClientSDK/source/PlayFabVersion.cs +++ b/PlayFabClientSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.13.151210"; + public static string SdkRevision = "0.14.160118"; public static string getVersionString() { diff --git a/PlayFabSDK/source/PlayFabVersion.cs b/PlayFabSDK/source/PlayFabVersion.cs index a94892a0..2d2f9c60 100644 --- a/PlayFabSDK/source/PlayFabVersion.cs +++ b/PlayFabSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.13.151210"; + public static string SdkRevision = "0.14.160118"; public static string getVersionString() { diff --git a/PlayFabServerSDK/source/PlayFabVersion.cs b/PlayFabServerSDK/source/PlayFabVersion.cs index a94892a0..2d2f9c60 100644 --- a/PlayFabServerSDK/source/PlayFabVersion.cs +++ b/PlayFabServerSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.13.151210"; + public static string SdkRevision = "0.14.160118"; public static string getVersionString() {