diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 4ade7593..6adbc14b 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -3013,6 +3013,64 @@ private static PlayFabResult privateGetLeaderb return pfResult; } + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ @@ -3303,6 +3361,64 @@ private static PlayFabResult privateGetUserStatisticsAs return pfResult; } + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdatePlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Creates and updates the title-specific custom data for the user which is readable and writable by the client */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index cb925cb7..7644d22c 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1362,9 +1362,13 @@ public static class GetPlayFabIDsFromPSNAccountIDsResult { public static class GetPlayFabIDsFromSteamIDsRequest { /** - * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + * Deprecated: Please use SteamStringIDs */ public ArrayList SteamIDs; + /** + * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + */ + public ArrayList SteamStringIDs; } @@ -2181,7 +2185,7 @@ public static class LoginWithKongregateRequest { */ public String TitleId; /** - * Unique identifier from Kongregate for the user. + * Numeric user ID assigned by Kongregate */ public String KongregateId; /** @@ -2961,9 +2965,13 @@ public static class StatisticValue { public static class SteamPlayFabIdPair { /** - * Unique Steam identifier for a user. + * Deprecated: Please use SteamStringId */ public Long SteamId; + /** + * Unique Steam identifier for a user. + */ + public String SteamStringId; /** * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. */ @@ -3584,7 +3592,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/internal/PlayFabVersion.java b/AndroidStudioExample/app/src/main/java/com/playfab/internal/PlayFabVersion.java index 09c3f9c0..44e3b3a7 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/internal/PlayFabVersion.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/internal/PlayFabVersion.java @@ -1,7 +1,7 @@ package com.playfab.internal; public class PlayFabVersion { - public static String SdkRevision = "0.16.160208"; + public static String SdkRevision = "0.17.160215"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index 4d81f546..291f1822 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -3012,6 +3012,64 @@ private static PlayFabResult privateGetLeaderb return pfResult; } + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ @@ -3302,6 +3360,64 @@ private static PlayFabResult privateGetUserStatisticsAs return pfResult; } + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdatePlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Creates and updates the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index cb925cb7..7644d22c 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -1362,9 +1362,13 @@ public static class GetPlayFabIDsFromPSNAccountIDsResult { public static class GetPlayFabIDsFromSteamIDsRequest { /** - * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + * Deprecated: Please use SteamStringIDs */ public ArrayList SteamIDs; + /** + * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + */ + public ArrayList SteamStringIDs; } @@ -2181,7 +2185,7 @@ public static class LoginWithKongregateRequest { */ public String TitleId; /** - * Unique identifier from Kongregate for the user. + * Numeric user ID assigned by Kongregate */ public String KongregateId; /** @@ -2961,9 +2965,13 @@ public static class StatisticValue { public static class SteamPlayFabIdPair { /** - * Unique Steam identifier for a user. + * Deprecated: Please use SteamStringId */ public Long SteamId; + /** + * Unique Steam identifier for a user. + */ + public String SteamStringId; /** * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. */ @@ -3584,7 +3592,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java index 09c3f9c0..44e3b3a7 100644 --- a/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java +++ b/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java @@ -1,7 +1,7 @@ package com.playfab.internal; public class PlayFabVersion { - public static String SdkRevision = "0.16.160208"; + public static String SdkRevision = "0.17.160215"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabSDK/src/PlayFabApiTest.java b/PlayFabSDK/src/PlayFabApiTest.java index b0b746b8..836d66d9 100644 --- a/PlayFabSDK/src/PlayFabApiTest.java +++ b/PlayFabSDK/src/PlayFabApiTest.java @@ -289,18 +289,17 @@ public void LeaderBoard() LoginOrRegister(); UserStatisticsApi(); - PlayFabClientModels.GetLeaderboardAroundCurrentUserRequest clientRequest = new PlayFabClientModels.GetLeaderboardAroundCurrentUserRequest(); + PlayFabClientModels.GetLeaderboardRequest clientRequest = new PlayFabClientModels.GetLeaderboardRequest(); clientRequest.MaxResultsCount = 3; clientRequest.StatisticName = TEST_STAT_NAME; - PlayFabResult clientResult = PlayFabClientAPI.GetLeaderboardAroundCurrentUser(clientRequest); + PlayFabResult clientResult = PlayFabClientAPI.GetLeaderboard(clientRequest); VerifyResult(clientResult, true); assertTrue(GetClLbCount(clientResult.Result.Leaderboard) > 0); - PlayFabServerModels.GetLeaderboardAroundUserRequest serverRequest = new PlayFabServerModels.GetLeaderboardAroundUserRequest(); + PlayFabServerModels.GetLeaderboardRequest serverRequest = new PlayFabServerModels.GetLeaderboardRequest(); serverRequest.MaxResultsCount = 3; serverRequest.StatisticName = TEST_STAT_NAME; - serverRequest.PlayFabId = playFabId; - PlayFabResult serverResult = PlayFabServerAPI.GetLeaderboardAroundUser(serverRequest); + PlayFabResult serverResult = PlayFabServerAPI.GetLeaderboard(serverRequest); VerifyResult(serverResult, true); assertTrue(GetSvLbCount(serverResult.Result.Leaderboard) > 0); } diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java index 26dfb856..95dececd 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java @@ -248,6 +248,64 @@ private static PlayFabResult privateUpdateUser return pfResult; } + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreatePlayerStatisticDefinitionAsync(request); + } + }); + } + + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreatePlayerStatisticDefinition(final CreatePlayerStatisticDefinitionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreatePlayerStatisticDefinitionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + CreatePlayerStatisticDefinitionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. */ @@ -364,6 +422,122 @@ private static PlayFabResult privateGetDataReportAsync(fina return pfResult; } + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticDefinitionsAsync(final GetPlayerStatisticDefinitionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticDefinitionsAsync(request); + } + }); + } + + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticDefinitions(final GetPlayerStatisticDefinitionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticDefinitionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticDefinitionsAsync(final GetPlayerStatisticDefinitionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticDefinitionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ @@ -712,6 +886,64 @@ private static PlayFabResult privateGetUserReadOnlyDataAsync( return pfResult; } + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + public static FutureTask> IncrementPlayerStatisticVersionAsync(final IncrementPlayerStatisticVersionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateIncrementPlayerStatisticVersionAsync(request); + } + }); + } + + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult IncrementPlayerStatisticVersion(final IncrementPlayerStatisticVersionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateIncrementPlayerStatisticVersionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateIncrementPlayerStatisticVersionAsync(final IncrementPlayerStatisticVersionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + IncrementPlayerStatisticVersionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Completely removes all statistics for the specified user, for the current game */ @@ -770,6 +1002,64 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UpdatePlayerStatisticDefinitionAsync(final UpdatePlayerStatisticDefinitionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticDefinitionAsync(request); + } + }); + } + + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UpdatePlayerStatisticDefinition(final UpdatePlayerStatisticDefinitionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticDefinitionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUpdatePlayerStatisticDefinitionAsync(final UpdatePlayerStatisticDefinitionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdatePlayerStatisticDefinitionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java index 258bfe12..4ab77138 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java @@ -318,7 +318,7 @@ public static class CreatePlayerStatisticDefinitionRequest { */ public String StatisticName; /** - * interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary + * interval at which the values of the statistic for all players are reset (resets begin at the next interval boundary) */ public StatisticResetIntervalOption VersionChangeInterval; @@ -757,7 +757,7 @@ public static class GetPlayerStatisticDefinitionsRequest { public static class GetPlayerStatisticDefinitionsResult { /** - * definitions of all statistics for the title + * the player statistic definitions for the title */ public ArrayList Statistics; @@ -1375,7 +1375,7 @@ public static class PlayerStatisticDefinition { */ public Long CurrentVersion; /** - * interval at which the values of the statistic for all players are reset + * interval at which the values of the statistic for all players are reset automatically */ public StatisticResetIntervalOption VersionChangeInterval; @@ -1804,7 +1804,7 @@ public static class UpdatePlayerStatisticDefinitionRequest { */ public String StatisticName; /** - * interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary + * interval at which the values of the statistic for all players are reset (changes are effective at the next occurance of the new interval boundary) */ public StatisticResetIntervalOption VersionChangeInterval; @@ -2106,7 +2106,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index 4d81f546..291f1822 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -3012,6 +3012,64 @@ private static PlayFabResult privateGetLeaderb return pfResult; } + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the current version and values for the indicated statistics, for the local player. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ @@ -3302,6 +3360,64 @@ private static PlayFabResult privateGetUserStatisticsAs return pfResult; } + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates the values of the specified title-specific statistics for the user + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UpdatePlayerStatistics", request, "X-Authorization", _authKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdatePlayerStatisticsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Creates and updates the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index cb925cb7..7644d22c 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -1362,9 +1362,13 @@ public static class GetPlayFabIDsFromPSNAccountIDsResult { public static class GetPlayFabIDsFromSteamIDsRequest { /** - * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + * Deprecated: Please use SteamStringIDs */ public ArrayList SteamIDs; + /** + * Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. + */ + public ArrayList SteamStringIDs; } @@ -2181,7 +2185,7 @@ public static class LoginWithKongregateRequest { */ public String TitleId; /** - * Unique identifier from Kongregate for the user. + * Numeric user ID assigned by Kongregate */ public String KongregateId; /** @@ -2961,9 +2965,13 @@ public static class StatisticValue { public static class SteamPlayFabIdPair { /** - * Unique Steam identifier for a user. + * Deprecated: Please use SteamStringId */ public Long SteamId; + /** + * Unique Steam identifier for a user. + */ + public String SteamStringId; /** * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. */ @@ -3584,7 +3592,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 84341d8f..55e1e7c0 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -2397,7 +2397,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java index 09c3f9c0..44e3b3a7 100644 --- a/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java +++ b/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java @@ -1,7 +1,7 @@ package com.playfab.internal; public class PlayFabVersion { - public static String SdkRevision = "0.16.160208"; + public static String SdkRevision = "0.17.160215"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java index 26dfb856..95dececd 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java @@ -248,6 +248,64 @@ private static PlayFabResult privateUpdateUser return pfResult; } + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreatePlayerStatisticDefinitionAsync(request); + } + }); + } + + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreatePlayerStatisticDefinition(final CreatePlayerStatisticDefinitionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreatePlayerStatisticDefinitionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + CreatePlayerStatisticDefinitionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics. */ @@ -364,6 +422,122 @@ private static PlayFabResult privateGetDataReportAsync(fina return pfResult; } + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticDefinitionsAsync(final GetPlayerStatisticDefinitionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticDefinitionsAsync(request); + } + }); + } + + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticDefinitions(final GetPlayerStatisticDefinitionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticDefinitionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticDefinitionsAsync(final GetPlayerStatisticDefinitionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticDefinitionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ @@ -712,6 +886,64 @@ private static PlayFabResult privateGetUserReadOnlyDataAsync( return pfResult; } + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + public static FutureTask> IncrementPlayerStatisticVersionAsync(final IncrementPlayerStatisticVersionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateIncrementPlayerStatisticVersionAsync(request); + } + }); + } + + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult IncrementPlayerStatisticVersion(final IncrementPlayerStatisticVersionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateIncrementPlayerStatisticVersionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Resets the indicated statistic, removing all player entries for it and backing up the old values. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateIncrementPlayerStatisticVersionAsync(final IncrementPlayerStatisticVersionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + IncrementPlayerStatisticVersionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Completely removes all statistics for the specified user, for the current game */ @@ -770,6 +1002,64 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UpdatePlayerStatisticDefinitionAsync(final UpdatePlayerStatisticDefinitionRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticDefinitionAsync(request); + } + }); + } + + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UpdatePlayerStatisticDefinition(final UpdatePlayerStatisticDefinitionRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdatePlayerStatisticDefinitionAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUpdatePlayerStatisticDefinitionAsync(final UpdatePlayerStatisticDefinitionRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdatePlayerStatisticDefinitionResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java index 258bfe12..4ab77138 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java @@ -318,7 +318,7 @@ public static class CreatePlayerStatisticDefinitionRequest { */ public String StatisticName; /** - * interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary + * interval at which the values of the statistic for all players are reset (resets begin at the next interval boundary) */ public StatisticResetIntervalOption VersionChangeInterval; @@ -757,7 +757,7 @@ public static class GetPlayerStatisticDefinitionsRequest { public static class GetPlayerStatisticDefinitionsResult { /** - * definitions of all statistics for the title + * the player statistic definitions for the title */ public ArrayList Statistics; @@ -1375,7 +1375,7 @@ public static class PlayerStatisticDefinition { */ public Long CurrentVersion; /** - * interval at which the values of the statistic for all players are reset + * interval at which the values of the statistic for all players are reset automatically */ public StatisticResetIntervalOption VersionChangeInterval; @@ -1804,7 +1804,7 @@ public static class UpdatePlayerStatisticDefinitionRequest { */ public String StatisticName; /** - * interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary + * interval at which the values of the statistic for all players are reset (changes are effective at the next occurance of the new interval boundary) */ public StatisticResetIntervalOption VersionChangeInterval; @@ -2106,7 +2106,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 84341d8f..55e1e7c0 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -2397,7 +2397,8 @@ public static enum UserOrigination { PSN, GameCenter, CustomId, - XboxLive + XboxLive, + Parse } public static class UserPrivateAccountInfo { diff --git a/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java index 09c3f9c0..44e3b3a7 100644 --- a/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java +++ b/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java @@ -1,7 +1,7 @@ package com.playfab.internal; public class PlayFabVersion { - public static String SdkRevision = "0.16.160208"; + public static String SdkRevision = "0.17.160215"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; }