diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index b9c341d8..461d4a11 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -381,7 +381,7 @@ private static PlayFabResult privateLoginWithGameCenterAsync(final } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static FutureTask> LoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) { @@ -393,7 +393,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static PlayFabResult LoginWithGoogleAccount(final LoginWithGoogleAccountRequest request) { @@ -411,7 +411,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") private static PlayFabResult privateLoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) throws Exception { @@ -1443,7 +1443,7 @@ private static PlayFabResult privateLinkGameCenterA } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> LinkGoogleAccountAsync(final LinkGoogleAccountRequest request) { @@ -1455,7 +1455,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult LinkGoogleAccount(final LinkGoogleAccountRequest request) { @@ -1473,7 +1473,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateLinkGoogleAccountAsync(final LinkGoogleAccountRequest request) throws Exception { @@ -1674,6 +1674,64 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); + ReportPlayerClientResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to change the password */ @@ -1964,7 +2022,7 @@ private static PlayFabResult privateUnlinkGameCen } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> UnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) { @@ -1976,7 +2034,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult UnlinkGoogleAccount(final UnlinkGoogleAccountRequest request) { @@ -1994,7 +2052,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) throws Exception { @@ -3008,7 +3066,7 @@ private static PlayFabResult privateGetUserStatisticsAs } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { @@ -3020,7 +3078,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { @@ -3038,7 +3096,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { @@ -3182,7 +3240,7 @@ private static PlayFabResult privateUpdateUserPublisherDat } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) { @@ -3194,7 +3252,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateUserStatistics(final UpdateUserStatisticsRequest request) { @@ -3212,7 +3270,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) throws Exception { @@ -3297,6 +3355,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the set of items defined for the specified store, including all prices defined */ @@ -3993,64 +4109,6 @@ private static PlayFabResult privateRedeemCouponAsync(final return pfResult; } - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); - ReportPlayerClientResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Creates an order for a list of items from the title catalog */ @@ -5211,64 +5269,6 @@ private static PlayFabResult privateCreateSharedGroupAs return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group may use this to retrieve group data, including membership, but they will not receive data for keys marked as private. */ @@ -5677,7 +5677,7 @@ private static PlayFabResult privateGetContentDownl } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) { @@ -5689,7 +5689,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) { @@ -5707,7 +5707,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception { @@ -5967,7 +5967,7 @@ private static PlayFabResult privateGetL } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) { @@ -5979,7 +5979,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) { @@ -5997,7 +5997,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception { @@ -6025,7 +6025,7 @@ private static PlayFabResult privateGrantCharacterTo } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) { @@ -6037,7 +6037,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateCharacterStatistics(final UpdateCharacterStatisticsRequest request) { @@ -6055,7 +6055,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) throws Exception { diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 67185871..83d3ff22 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1928,7 +1928,7 @@ public static class LinkGameCenterAccountResult { public static class LinkGoogleAccountRequest { /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; @@ -2144,7 +2144,7 @@ public static class LoginWithGoogleAccountRequest { */ public String TitleId; /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; /** @@ -2489,22 +2489,6 @@ public static class PlayerStatisticVersion { } - public static class PlayStreamEventHistory { - /** - * The ID of the trigger that caused this event to be created. - */ - public String ParentTriggerId; - /** - * The ID of the previous event that caused this event to be created by hitting a trigger. - */ - public String ParentEventId; - /** - * If true, then this event was allowed to trigger subsequent events in a trigger. - */ - public Boolean TriggeredEvents; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2847,15 +2831,6 @@ public static class SharedGroupDataRecord { } - public static enum SourceType { - Admin, - BackEnd, - GameClient, - GameServer, - Partner, - Stream - } - public static class StartGameRequest { /** * version information for the build of the game server which is to be started @@ -3399,7 +3374,7 @@ public static class UpdateUserDataResult { public static class UpdateUserStatisticsRequest { /** - * Statistics to be updated with the provided values. + * Statistics to be updated with the provided values. UserStatistics object must follow the Key(string), Value(int) pattern. */ public Map UserStatistics; diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java index 979f620d..bf96b09d 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java @@ -215,7 +215,10 @@ public static enum PlayFabErrorCode { CloudScriptHTTPRequestError(1211), InsufficientGuildRole(1212), GuildNotFound(1213), - OverLimit(1214); + OverLimit(1214), + EventNotFound(1215), + InvalidEventEntity(1216), + InvalidEventName(1217); public int id; 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 5f5f663c..e009a3b8 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.20.160328"; + public static String SdkRevision = "0.21.160411"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index b1f8b219..8c298f82 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -380,7 +380,7 @@ private static PlayFabResult privateLoginWithGameCenterAsync(final } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static FutureTask> LoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) { @@ -392,7 +392,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static PlayFabResult LoginWithGoogleAccount(final LoginWithGoogleAccountRequest request) { @@ -410,7 +410,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") private static PlayFabResult privateLoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) throws Exception { @@ -1442,7 +1442,7 @@ private static PlayFabResult privateLinkGameCenterA } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> LinkGoogleAccountAsync(final LinkGoogleAccountRequest request) { @@ -1454,7 +1454,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult LinkGoogleAccount(final LinkGoogleAccountRequest request) { @@ -1472,7 +1472,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateLinkGoogleAccountAsync(final LinkGoogleAccountRequest request) throws Exception { @@ -1673,6 +1673,64 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); + ReportPlayerClientResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to change the password */ @@ -1963,7 +2021,7 @@ private static PlayFabResult privateUnlinkGameCen } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> UnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) { @@ -1975,7 +2033,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult UnlinkGoogleAccount(final UnlinkGoogleAccountRequest request) { @@ -1993,7 +2051,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) throws Exception { @@ -3007,7 +3065,7 @@ private static PlayFabResult privateGetUserStatisticsAs } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { @@ -3019,7 +3077,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { @@ -3037,7 +3095,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { @@ -3181,7 +3239,7 @@ private static PlayFabResult privateUpdateUserPublisherDat } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) { @@ -3193,7 +3251,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateUserStatistics(final UpdateUserStatisticsRequest request) { @@ -3211,7 +3269,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) throws Exception { @@ -3296,6 +3354,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the set of items defined for the specified store, including all prices defined */ @@ -3992,64 +4108,6 @@ private static PlayFabResult privateRedeemCouponAsync(final return pfResult; } - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); - ReportPlayerClientResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Creates an order for a list of items from the title catalog */ @@ -5210,64 +5268,6 @@ private static PlayFabResult privateCreateSharedGroupAs return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group may use this to retrieve group data, including membership, but they will not receive data for keys marked as private. */ @@ -5676,7 +5676,7 @@ private static PlayFabResult privateGetContentDownl } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) { @@ -5688,7 +5688,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) { @@ -5706,7 +5706,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception { @@ -5966,7 +5966,7 @@ private static PlayFabResult privateGetL } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) { @@ -5978,7 +5978,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) { @@ -5996,7 +5996,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception { @@ -6024,7 +6024,7 @@ private static PlayFabResult privateGrantCharacterTo } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) { @@ -6036,7 +6036,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateCharacterStatistics(final UpdateCharacterStatisticsRequest request) { @@ -6054,7 +6054,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) throws Exception { diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 67185871..83d3ff22 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -1928,7 +1928,7 @@ public static class LinkGameCenterAccountResult { public static class LinkGoogleAccountRequest { /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; @@ -2144,7 +2144,7 @@ public static class LoginWithGoogleAccountRequest { */ public String TitleId; /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; /** @@ -2489,22 +2489,6 @@ public static class PlayerStatisticVersion { } - public static class PlayStreamEventHistory { - /** - * The ID of the trigger that caused this event to be created. - */ - public String ParentTriggerId; - /** - * The ID of the previous event that caused this event to be created by hitting a trigger. - */ - public String ParentEventId; - /** - * If true, then this event was allowed to trigger subsequent events in a trigger. - */ - public Boolean TriggeredEvents; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2847,15 +2831,6 @@ public static class SharedGroupDataRecord { } - public static enum SourceType { - Admin, - BackEnd, - GameClient, - GameServer, - Partner, - Stream - } - public static class StartGameRequest { /** * version information for the build of the game server which is to be started @@ -3399,7 +3374,7 @@ public static class UpdateUserDataResult { public static class UpdateUserStatisticsRequest { /** - * Statistics to be updated with the provided values. + * Statistics to be updated with the provided values. UserStatistics object must follow the Key(string), Value(int) pattern. */ public Map UserStatistics; diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java index 979f620d..bf96b09d 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java @@ -215,7 +215,10 @@ public static enum PlayFabErrorCode { CloudScriptHTTPRequestError(1211), InsufficientGuildRole(1212), GuildNotFound(1213), - OverLimit(1214); + OverLimit(1214), + EventNotFound(1215), + InvalidEventEntity(1216), + InvalidEventName(1217); public int id; diff --git a/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java index 5f5f663c..e009a3b8 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.20.160328"; + public static String SdkRevision = "0.21.160411"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java index 95dececd..9ffe2ab8 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java @@ -1582,6 +1582,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the random drop table configuration for the title */ @@ -3032,64 +3090,6 @@ private static PlayFabResult privateRemoveServerBuildAs return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates the key-value store of custom publisher settings */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index b1f8b219..8c298f82 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -380,7 +380,7 @@ private static PlayFabResult privateLoginWithGameCenterAsync(final } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static FutureTask> LoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) { @@ -392,7 +392,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") public static PlayFabResult LoginWithGoogleAccount(final LoginWithGoogleAccountRequest request) { @@ -410,7 +410,7 @@ public PlayFabResult call() throws Exception { } /** - * Signs the user in using a Google account access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * Signs the user in using a Google account access token(https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods), returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @SuppressWarnings("unchecked") private static PlayFabResult privateLoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) throws Exception { @@ -1442,7 +1442,7 @@ private static PlayFabResult privateLinkGameCenterA } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> LinkGoogleAccountAsync(final LinkGoogleAccountRequest request) { @@ -1454,7 +1454,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult LinkGoogleAccount(final LinkGoogleAccountRequest request) { @@ -1472,7 +1472,7 @@ public PlayFabResult call() throws Exception { } /** - * Links the currently signed-in user account to the Google account specified by the Google account access token + * Links the currently signed-in user account to the Google account specified by the Google account access token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateLinkGoogleAccountAsync(final LinkGoogleAccountRequest request) throws Exception { @@ -1673,6 +1673,64 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateReportPlayerAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); + ReportPlayerClientResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to change the password */ @@ -1963,7 +2021,7 @@ private static PlayFabResult privateUnlinkGameCen } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static FutureTask> UnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) { @@ -1975,7 +2033,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") public static PlayFabResult UnlinkGoogleAccount(final UnlinkGoogleAccountRequest request) { @@ -1993,7 +2051,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlinks the related Google account from the user's PlayFab account + * Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) throws Exception { @@ -3007,7 +3065,7 @@ private static PlayFabResult privateGetUserStatisticsAs } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) { @@ -3019,7 +3077,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) { @@ -3037,7 +3095,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception { @@ -3181,7 +3239,7 @@ private static PlayFabResult privateUpdateUserPublisherDat } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) { @@ -3193,7 +3251,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateUserStatistics(final UpdateUserStatisticsRequest request) { @@ -3211,7 +3269,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) throws Exception { @@ -3296,6 +3354,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the set of items defined for the specified store, including all prices defined */ @@ -3992,64 +4108,6 @@ private static PlayFabResult privateRedeemCouponAsync(final return pfResult; } - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateReportPlayerAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title can take action concerning potentially toxic players. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ReportPlayer", 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()); - ReportPlayerClientResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Creates an order for a list of items from the title catalog */ @@ -5210,64 +5268,6 @@ private static PlayFabResult privateCreateSharedGroupAs return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group may use this to retrieve group data, including membership, but they will not receive data for keys marked as private. */ @@ -5676,7 +5676,7 @@ private static PlayFabResult privateGetContentDownl } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) { @@ -5688,7 +5688,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) { @@ -5706,7 +5706,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception { @@ -5966,7 +5966,7 @@ private static PlayFabResult privateGetL } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) { @@ -5978,7 +5978,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) { @@ -5996,7 +5996,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception { @@ -6024,7 +6024,7 @@ private static PlayFabResult privateGrantCharacterTo } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) { @@ -6036,7 +6036,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateCharacterStatistics(final UpdateCharacterStatisticsRequest request) { @@ -6054,7 +6054,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the specific character + * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) throws Exception { diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 67185871..83d3ff22 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -1928,7 +1928,7 @@ public static class LinkGameCenterAccountResult { public static class LinkGoogleAccountRequest { /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; @@ -2144,7 +2144,7 @@ public static class LoginWithGoogleAccountRequest { */ public String TitleId; /** - * Unique token from Google Play for the user. + * Unique token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods) from Google Play for the user. */ public String AccessToken; /** @@ -2489,22 +2489,6 @@ public static class PlayerStatisticVersion { } - public static class PlayStreamEventHistory { - /** - * The ID of the trigger that caused this event to be created. - */ - public String ParentTriggerId; - /** - * The ID of the previous event that caused this event to be created by hitting a trigger. - */ - public String ParentEventId; - /** - * If true, then this event was allowed to trigger subsequent events in a trigger. - */ - public Boolean TriggeredEvents; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2847,15 +2831,6 @@ public static class SharedGroupDataRecord { } - public static enum SourceType { - Admin, - BackEnd, - GameClient, - GameServer, - Partner, - Stream - } - public static class StartGameRequest { /** * version information for the build of the game server which is to be started @@ -3399,7 +3374,7 @@ public static class UpdateUserDataResult { public static class UpdateUserStatisticsRequest { /** - * Statistics to be updated with the provided values. + * Statistics to be updated with the provided values. UserStatistics object must follow the Key(string), Value(int) pattern. */ public Map UserStatistics; diff --git a/PlayFabSDK/src/com/playfab/PlayFabErrors.java b/PlayFabSDK/src/com/playfab/PlayFabErrors.java index 979f620d..bf96b09d 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabSDK/src/com/playfab/PlayFabErrors.java @@ -215,7 +215,10 @@ public static enum PlayFabErrorCode { CloudScriptHTTPRequestError(1211), InsufficientGuildRole(1212), GuildNotFound(1213), - OverLimit(1214); + OverLimit(1214), + EventNotFound(1215), + InvalidEventEntity(1216), + InvalidEventName(1217); public int id; diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index 9ab8ef0a..8cc46a0b 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -1409,7 +1409,7 @@ private static PlayFabResult privateUpdateUserReadOnlyData } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) { @@ -1421,7 +1421,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateUserStatistics(final UpdateUserStatisticsRequest request) { @@ -1439,7 +1439,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) throws Exception { @@ -1524,6 +1524,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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() + "/Server/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the key-value store of custom title settings */ @@ -1698,6 +1756,64 @@ private static PlayFabResult privateGetTitleNewsAsync(final return pfResult; } + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> SetPublisherDataAsync(final SetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateSetPublisherDataAsync(request); + } + }); + } + + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult SetPublisherData(final SetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateSetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateSetPublisherDataAsync(final SetPublisherDataRequest 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() + "/Server/SetPublisherData", 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()); + SetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the key-value store of custom title settings */ @@ -3380,64 +3496,6 @@ private static PlayFabResult privateDeleteSharedGroupAsync(final De return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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() + "/Server/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves data stored in a shared group object, as well as the list of members in the group. The server can access all public and private group data. */ @@ -3555,25 +3613,25 @@ private static PlayFabResult privateRemoveShared } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - public static FutureTask> SetPublisherDataAsync(final SetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateSetPublisherDataAsync(request); + public static FutureTask> UpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdateSharedGroupDataAsync(request); } }); } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - public static PlayFabResult SetPublisherData(final SetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateSetPublisherDataAsync(request); + public static PlayFabResult UpdateSharedGroupData(final UpdateSharedGroupDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdateSharedGroupDataAsync(request); } }); try { @@ -3585,53 +3643,53 @@ public PlayFabResult call() throws Exception { } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - private static PlayFabResult privateSetPublisherDataAsync(final SetPublisherDataRequest request) throws Exception { + private static PlayFabResult privateUpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest 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() + "/Server/SetPublisherData", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/UpdateSharedGroupData", 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(); + PlayFabResult result = new PlayFabResult(); result.Error = error; return result; } String resultRawJson = (String) httpResult; - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - SetPublisherDataResult result = resultData.data; + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdateSharedGroupDataResult result = resultData.data; - PlayFabResult pfResult = new PlayFabResult(); + PlayFabResult pfResult = new PlayFabResult(); pfResult.Result = result; return pfResult; } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - public static FutureTask> UpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUpdateSharedGroupDataAsync(request); + public static FutureTask> ExecuteCloudScriptAsync(final ExecuteCloudScriptServerRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateExecuteCloudScriptAsync(request); } }); } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - public static PlayFabResult UpdateSharedGroupData(final UpdateSharedGroupDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUpdateSharedGroupDataAsync(request); + public static PlayFabResult ExecuteCloudScript(final ExecuteCloudScriptServerRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateExecuteCloudScriptAsync(request); } }); try { @@ -3643,29 +3701,29 @@ public PlayFabResult call() throws Exception { } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - private static PlayFabResult privateUpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) throws Exception { + private static PlayFabResult privateExecuteCloudScriptAsync(final ExecuteCloudScriptServerRequest 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() + "/Server/UpdateSharedGroupData", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/ExecuteCloudScript", 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(); + PlayFabResult result = new PlayFabResult(); result.Error = error; return result; } String resultRawJson = (String) httpResult; - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - UpdateSharedGroupDataResult result = resultData.data; + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + ExecuteCloudScriptResult result = resultData.data; - PlayFabResult pfResult = new PlayFabResult(); + PlayFabResult pfResult = new PlayFabResult(); pfResult.Result = result; return pfResult; } @@ -3787,7 +3845,7 @@ private static PlayFabResult privateDeleteCharact } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) { @@ -3799,7 +3857,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) { @@ -3817,7 +3875,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception { @@ -4077,7 +4135,7 @@ private static PlayFabResult privateGetL } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) { @@ -4089,7 +4147,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) { @@ -4107,7 +4165,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception { diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index acab4e52..f377db4f 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -288,6 +288,12 @@ public static class CharacterResult { } + public static enum CloudScriptRevisionOption { + Live, + Latest, + Specific + } + public static class ConsumeItemRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -549,6 +555,68 @@ public static class EmptyResult { } + public static class ExecuteCloudScriptResult { + /** + * The name of the function that executed + */ + public String FunctionName; + /** + * The revision of the CloudScript that executed + */ + public Integer Revision; + /** + * The object returned from the CloudScript function, if any + */ + public Object FunctionResult; + /** + * Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures. + */ + public ArrayList Logs; + public Double ExecutionTimeSeconds; + public Long MemoryConsumedBytes; + /** + * Number of PlayFab API requests issued by the CloudScript function + */ + public Integer APIRequestsIssued; + /** + * Number of external HTTP requests issued by the CloudScript function + */ + public Integer HttpRequestsIssued; + /** + * Information about the error, if any, that occured during execution + */ + public ScriptExecutionError Error; + + } + + public static class ExecuteCloudScriptServerRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * The name of the CloudScript function to execute + */ + public String FunctionName; + /** + * Object that is passed in to the function as the first argument + */ + public Object FunctionParameter; + /** + * Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. + */ + public CloudScriptRevisionOption RevisionSelection; + /** + * The specivic revision to execute, when RevisionSelection is set to 'Specific' + */ + public Integer SpecificRevision; + /** + * Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + */ + public Boolean GeneratePlayStreamEvent; + + } + public static class FacebookPlayFabIdPair { /** * Unique Facebook identifier for a user. @@ -755,26 +823,6 @@ public static class GetCharacterStatisticsResult { } - public static class GetCloudScriptUrlRequest { - /** - * Cloud Script Version to use. Defaults to 1. - */ - public Integer Version; - /** - * Specifies whether the URL returned should be the one for the most recently uploaded Revision of the Cloud Script (true), or the Revision most recently set to live (false). Defaults to false. - */ - public Boolean Testing; - - } - - public static class GetCloudScriptUrlResult { - /** - * URL of the Cloud Script logic server. - */ - public String Url; - - } - public static class GetContentDownloadUrlRequest { /** * Key of the content item to fetch, usually formatted as a path, e.g. images/a.png @@ -1489,6 +1537,19 @@ public static class LogEventResult { } + public static class LogStatement { + /** + * 'Debug', 'Info', or 'Error' + */ + public String Level; + public String Message; + /** + * Optional object accompanying the message as contextual information + */ + public Object Data; + + } + public static class ModifyCharacterVirtualCurrencyResult { /** * Name of the virtual currency which was modified. @@ -1689,22 +1750,6 @@ public static class PlayerStatisticVersion { } - public static class PlayStreamEventHistory { - /** - * The ID of the trigger that caused this event to be created. - */ - public String ParentTriggerId; - /** - * The ID of the previous event that caused this event to be created by hitting a trigger. - */ - public String ParentEventId; - /** - * If true, then this event was allowed to trigger subsequent events in a trigger. - */ - public Boolean TriggeredEvents; - - } - public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1825,35 +1870,19 @@ public static class RevokeInventoryResult { } - public static class RunCloudScriptResult { - /** - * id of Cloud Script run - */ - public String ActionId; - /** - * version of Cloud Script run - */ - public Integer Version; + public static class ScriptExecutionError { /** - * revision of Cloud Script run + * Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError */ - public Integer Revision; - /** - * return values from the server action as a dynamic object - */ - public Object Results; - /** - * return values from the server action as a JSON encoded string - */ - public String ResultsEncoded; + public String Error; /** - * any log statements generated during the run of this action + * Details about the error */ - public String ActionLog; + public String Message; /** - * time this script took to run, in seconds + * Point during the execution of the script at which the error occurred, if any */ - public Double ExecutionTime; + public String StackTrace; } @@ -1929,15 +1958,6 @@ public static class SharedGroupDataRecord { } - public static enum SourceType { - Admin, - BackEnd, - GameClient, - GameServer, - Partner, - Stream - } - public static class StatisticNameVersion { /** * unique name of the statistic diff --git a/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java index 5f5f663c..e009a3b8 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.20.160328"; + public static String SdkRevision = "0.21.160411"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java index 95dececd..9ffe2ab8 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java @@ -1582,6 +1582,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the random drop table configuration for the title */ @@ -3032,64 +3090,6 @@ private static PlayFabResult privateRemoveServerBuildAs return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates the key-value store of custom publisher settings */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java index 979f620d..bf96b09d 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java @@ -215,7 +215,10 @@ public static enum PlayFabErrorCode { CloudScriptHTTPRequestError(1211), InsufficientGuildRole(1212), GuildNotFound(1213), - OverLimit(1214); + OverLimit(1214), + EventNotFound(1215), + InvalidEventEntity(1216), + InvalidEventName(1217); public int id; diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index 9ab8ef0a..8cc46a0b 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -1409,7 +1409,7 @@ private static PlayFabResult privateUpdateUserReadOnlyData } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static FutureTask> UpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) { @@ -1421,7 +1421,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") public static PlayFabResult UpdateUserStatistics(final UpdateUserStatisticsRequest request) { @@ -1439,7 +1439,7 @@ public PlayFabResult call() throws Exception { } /** - * Updates the values of the specified title-specific statistics for the user + * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUpdateUserStatisticsAsync(final UpdateUserStatisticsRequest request) throws Exception { @@ -1524,6 +1524,64 @@ private static PlayFabResult privateGetCatalogItemsAsync( return pfResult; } + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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() + "/Server/GetPublisherData", 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()); + GetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the key-value store of custom title settings */ @@ -1698,6 +1756,64 @@ private static PlayFabResult privateGetTitleNewsAsync(final return pfResult; } + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static FutureTask> SetPublisherDataAsync(final SetPublisherDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateSetPublisherDataAsync(request); + } + }); + } + + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + public static PlayFabResult SetPublisherData(final SetPublisherDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateSetPublisherDataAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Updates the key-value store of custom publisher settings + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateSetPublisherDataAsync(final SetPublisherDataRequest 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() + "/Server/SetPublisherData", 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()); + SetPublisherDataResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the key-value store of custom title settings */ @@ -3380,64 +3496,6 @@ private static PlayFabResult privateDeleteSharedGroupAsync(final De return pfResult; } - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPublisherDataAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the key-value store of custom publisher settings - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest 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() + "/Server/GetPublisherData", 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()); - GetPublisherDataResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves data stored in a shared group object, as well as the list of members in the group. The server can access all public and private group data. */ @@ -3555,25 +3613,25 @@ private static PlayFabResult privateRemoveShared } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - public static FutureTask> SetPublisherDataAsync(final SetPublisherDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateSetPublisherDataAsync(request); + public static FutureTask> UpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdateSharedGroupDataAsync(request); } }); } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - public static PlayFabResult SetPublisherData(final SetPublisherDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateSetPublisherDataAsync(request); + public static PlayFabResult UpdateSharedGroupData(final UpdateSharedGroupDataRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUpdateSharedGroupDataAsync(request); } }); try { @@ -3585,53 +3643,53 @@ public PlayFabResult call() throws Exception { } /** - * Updates the key-value store of custom publisher settings + * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. */ @SuppressWarnings("unchecked") - private static PlayFabResult privateSetPublisherDataAsync(final SetPublisherDataRequest request) throws Exception { + private static PlayFabResult privateUpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest 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() + "/Server/SetPublisherData", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/UpdateSharedGroupData", 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(); + PlayFabResult result = new PlayFabResult(); result.Error = error; return result; } String resultRawJson = (String) httpResult; - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - SetPublisherDataResult result = resultData.data; + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + UpdateSharedGroupDataResult result = resultData.data; - PlayFabResult pfResult = new PlayFabResult(); + PlayFabResult pfResult = new PlayFabResult(); pfResult.Result = result; return pfResult; } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - public static FutureTask> UpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUpdateSharedGroupDataAsync(request); + public static FutureTask> ExecuteCloudScriptAsync(final ExecuteCloudScriptServerRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateExecuteCloudScriptAsync(request); } }); } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - public static PlayFabResult UpdateSharedGroupData(final UpdateSharedGroupDataRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUpdateSharedGroupDataAsync(request); + public static PlayFabResult ExecuteCloudScript(final ExecuteCloudScriptServerRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateExecuteCloudScriptAsync(request); } }); try { @@ -3643,29 +3701,29 @@ public PlayFabResult call() throws Exception { } /** - * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group (and the server) can update the data. + * Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value. */ @SuppressWarnings("unchecked") - private static PlayFabResult privateUpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) throws Exception { + private static PlayFabResult privateExecuteCloudScriptAsync(final ExecuteCloudScriptServerRequest 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() + "/Server/UpdateSharedGroupData", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/ExecuteCloudScript", 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(); + PlayFabResult result = new PlayFabResult(); result.Error = error; return result; } String resultRawJson = (String) httpResult; - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - UpdateSharedGroupDataResult result = resultData.data; + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + ExecuteCloudScriptResult result = resultData.data; - PlayFabResult pfResult = new PlayFabResult(); + PlayFabResult pfResult = new PlayFabResult(); pfResult.Result = result; return pfResult; } @@ -3787,7 +3845,7 @@ private static PlayFabResult privateDeleteCharact } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) { @@ -3799,7 +3857,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) { @@ -3817,7 +3875,7 @@ public PlayFabResult call() throws Exception { } /** - * Lists all of the characters that belong to a specific user. + * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception { @@ -4077,7 +4135,7 @@ private static PlayFabResult privateGetL } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) { @@ -4089,7 +4147,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) { @@ -4107,7 +4165,7 @@ public PlayFabResult call() throws Exception { } /** - * Grants the specified character type to the user. + * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception { diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index acab4e52..f377db4f 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -288,6 +288,12 @@ public static class CharacterResult { } + public static enum CloudScriptRevisionOption { + Live, + Latest, + Specific + } + public static class ConsumeItemRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -549,6 +555,68 @@ public static class EmptyResult { } + public static class ExecuteCloudScriptResult { + /** + * The name of the function that executed + */ + public String FunctionName; + /** + * The revision of the CloudScript that executed + */ + public Integer Revision; + /** + * The object returned from the CloudScript function, if any + */ + public Object FunctionResult; + /** + * Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures. + */ + public ArrayList Logs; + public Double ExecutionTimeSeconds; + public Long MemoryConsumedBytes; + /** + * Number of PlayFab API requests issued by the CloudScript function + */ + public Integer APIRequestsIssued; + /** + * Number of external HTTP requests issued by the CloudScript function + */ + public Integer HttpRequestsIssued; + /** + * Information about the error, if any, that occured during execution + */ + public ScriptExecutionError Error; + + } + + public static class ExecuteCloudScriptServerRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * The name of the CloudScript function to execute + */ + public String FunctionName; + /** + * Object that is passed in to the function as the first argument + */ + public Object FunctionParameter; + /** + * Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. + */ + public CloudScriptRevisionOption RevisionSelection; + /** + * The specivic revision to execute, when RevisionSelection is set to 'Specific' + */ + public Integer SpecificRevision; + /** + * Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + */ + public Boolean GeneratePlayStreamEvent; + + } + public static class FacebookPlayFabIdPair { /** * Unique Facebook identifier for a user. @@ -755,26 +823,6 @@ public static class GetCharacterStatisticsResult { } - public static class GetCloudScriptUrlRequest { - /** - * Cloud Script Version to use. Defaults to 1. - */ - public Integer Version; - /** - * Specifies whether the URL returned should be the one for the most recently uploaded Revision of the Cloud Script (true), or the Revision most recently set to live (false). Defaults to false. - */ - public Boolean Testing; - - } - - public static class GetCloudScriptUrlResult { - /** - * URL of the Cloud Script logic server. - */ - public String Url; - - } - public static class GetContentDownloadUrlRequest { /** * Key of the content item to fetch, usually formatted as a path, e.g. images/a.png @@ -1489,6 +1537,19 @@ public static class LogEventResult { } + public static class LogStatement { + /** + * 'Debug', 'Info', or 'Error' + */ + public String Level; + public String Message; + /** + * Optional object accompanying the message as contextual information + */ + public Object Data; + + } + public static class ModifyCharacterVirtualCurrencyResult { /** * Name of the virtual currency which was modified. @@ -1689,22 +1750,6 @@ public static class PlayerStatisticVersion { } - public static class PlayStreamEventHistory { - /** - * The ID of the trigger that caused this event to be created. - */ - public String ParentTriggerId; - /** - * The ID of the previous event that caused this event to be created by hitting a trigger. - */ - public String ParentEventId; - /** - * If true, then this event was allowed to trigger subsequent events in a trigger. - */ - public Boolean TriggeredEvents; - - } - public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1825,35 +1870,19 @@ public static class RevokeInventoryResult { } - public static class RunCloudScriptResult { - /** - * id of Cloud Script run - */ - public String ActionId; - /** - * version of Cloud Script run - */ - public Integer Version; + public static class ScriptExecutionError { /** - * revision of Cloud Script run + * Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError */ - public Integer Revision; - /** - * return values from the server action as a dynamic object - */ - public Object Results; - /** - * return values from the server action as a JSON encoded string - */ - public String ResultsEncoded; + public String Error; /** - * any log statements generated during the run of this action + * Details about the error */ - public String ActionLog; + public String Message; /** - * time this script took to run, in seconds + * Point during the execution of the script at which the error occurred, if any */ - public Double ExecutionTime; + public String StackTrace; } @@ -1929,15 +1958,6 @@ public static class SharedGroupDataRecord { } - public static enum SourceType { - Admin, - BackEnd, - GameClient, - GameServer, - Partner, - Stream - } - public static class StatisticNameVersion { /** * unique name of the statistic diff --git a/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java index 5f5f663c..e009a3b8 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.20.160328"; + public static String SdkRevision = "0.21.160411"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; }