From c8fa2785a8f941d460dbf95f0c26937536f112c3 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Tue, 23 Feb 2016 19:02:36 +0000 Subject: [PATCH 1/8] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientModels.java | 12 +- .../src/com/playfab/PlayFabClientModels.java | 12 +- .../src/com/playfab/PlayFabAdminAPI.java | 116 ++++++ .../src/com/playfab/PlayFabAdminModels.java | 8 +- .../src/com/playfab/PlayFabClientModels.java | 12 +- .../com/playfab/PlayFabMatchmakerModels.java | 2 +- .../src/com/playfab/PlayFabServerAPI.java | 348 ++++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 6 +- .../src/com/playfab/PlayFabAdminAPI.java | 116 ++++++ .../src/com/playfab/PlayFabAdminModels.java | 8 +- .../com/playfab/PlayFabMatchmakerModels.java | 2 +- .../src/com/playfab/PlayFabServerAPI.java | 348 ++++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 6 +- 13 files changed, 962 insertions(+), 34 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 7644d22c..68d64914 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -448,7 +448,7 @@ public static class ConsumePSNEntitlementsResult { /** * Array of items granted to the player as a result of consuming entitlements. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList ItemsGranted; } @@ -834,7 +834,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -903,7 +903,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1476,7 +1476,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered("ItemId") + @Unordered public ArrayList Store; } @@ -1593,7 +1593,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1658,7 +1658,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 7644d22c..68d64914 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -448,7 +448,7 @@ public static class ConsumePSNEntitlementsResult { /** * Array of items granted to the player as a result of consuming entitlements. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList ItemsGranted; } @@ -834,7 +834,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -903,7 +903,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1476,7 +1476,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered("ItemId") + @Unordered public ArrayList Store; } @@ -1593,7 +1593,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1658,7 +1658,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java index 95dececd..a1483fe2 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java @@ -944,6 +944,64 @@ private static PlayFabResult privateIncre return pfResult; } + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + public static FutureTask> RefundPurchaseAsync(final RefundPurchaseRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRefundPurchaseAsync(request); + } + }); + } + + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RefundPurchase(final RefundPurchaseRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRefundPurchaseAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRefundPurchaseAsync(final RefundPurchaseRequest 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/RefundPurchase", 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()); + RefundPurchaseResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Completely removes all statistics for the specified user, for the current game */ @@ -1002,6 +1060,64 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + public static FutureTask> ResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateResolvePurchaseDisputeAsync(request); + } + }); + } + + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult ResolvePurchaseDispute(final ResolvePurchaseDisputeRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateResolvePurchaseDisputeAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest 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/ResolvePurchaseDispute", 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()); + ResolvePurchaseDisputeResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java index 4ab77138..3a3f2a4a 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java @@ -557,7 +557,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -900,7 +900,7 @@ public static class GetStoreItemsResult { /** * Array of items which can be purchased from this store. */ - @Unordered("ItemId") + @Unordered public ArrayList Store; } @@ -969,7 +969,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1203,7 +1203,7 @@ public static class ListBuildsResult { /** * array of uploaded game server builds */ - @Unordered("BuildId") + @Unordered public ArrayList Builds; } diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 7644d22c..68d64914 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -448,7 +448,7 @@ public static class ConsumePSNEntitlementsResult { /** * Array of items granted to the player as a result of consuming entitlements. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList ItemsGranted; } @@ -834,7 +834,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -903,7 +903,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1476,7 +1476,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered("ItemId") + @Unordered public ArrayList Store; } @@ -1593,7 +1593,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1658,7 +1658,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java b/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java index 9523251b..3662bb4e 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java @@ -207,7 +207,7 @@ public static class UserInfoResponse { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..55572b40 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -364,6 +364,64 @@ private static PlayFabResult privateDeleteUsersAsync(final De return pfResult; } + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendLeaderboardAsync(request); + } + }); + } + + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFriendLeaderboard(final GetFriendLeaderboardRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendLeaderboardAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFriendLeaderboardAsync(final GetFriendLeaderboardRequest 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/GetFriendLeaderboard", 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()); + GetLeaderboardResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard */ @@ -2916,6 +2974,180 @@ private static PlayFabResult privateUpdateUse return pfResult; } + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + public static FutureTask> AddFriendAsync(final AddFriendRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateAddFriendAsync(request); + } + }); + } + + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult AddFriend(final AddFriendRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateAddFriendAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateAddFriendAsync(final AddFriendRequest 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/AddFriend", 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()); + EmptyResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFriendsListAsync(final GetFriendsListRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendsListAsync(request); + } + }); + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFriendsList(final GetFriendsListRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendsListAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFriendsListAsync(final GetFriendsListRequest 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/GetFriendsList", 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()); + GetFriendsListResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + public static FutureTask> RemoveFriendAsync(final RemoveFriendRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRemoveFriendAsync(request); + } + }); + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RemoveFriend(final RemoveFriendRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRemoveFriendAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRemoveFriendAsync(final RemoveFriendRequest 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/RemoveFriend", 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()); + EmptyResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Informs the PlayFab match-making service that the user specified has left the Game Server Instance */ @@ -3612,6 +3844,122 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetCloudScriptUrlAsync(final GetCloudScriptUrlRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetCloudScriptUrlAsync(request); + } + }); + } + + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetCloudScriptUrl(final GetCloudScriptUrlRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetCloudScriptUrlAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetCloudScriptUrlAsync(final GetCloudScriptUrlRequest 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/GetCloudScriptUrl", 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()); + GetCloudScriptUrlResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + public static FutureTask> RunServerCloudScriptAsync(final RunServerCloudScriptRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRunServerCloudScriptAsync(request); + } + }); + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RunServerCloudScript(final RunServerCloudScriptRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRunServerCloudScriptAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRunServerCloudScriptAsync(final RunServerCloudScriptRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetLogicURL() + "/Server/RunServerCloudScript", 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()); + RunCloudScriptResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index c33e18af..35eeb6e3 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -633,7 +633,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -706,7 +706,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1179,7 +1179,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java index 95dececd..a1483fe2 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java @@ -944,6 +944,64 @@ private static PlayFabResult privateIncre return pfResult; } + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + public static FutureTask> RefundPurchaseAsync(final RefundPurchaseRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRefundPurchaseAsync(request); + } + }); + } + + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RefundPurchase(final RefundPurchaseRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRefundPurchaseAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Attempts to process an order refund through the original real money payment provider. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRefundPurchaseAsync(final RefundPurchaseRequest 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/RefundPurchase", 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()); + RefundPurchaseResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Completely removes all statistics for the specified user, for the current game */ @@ -1002,6 +1060,64 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + public static FutureTask> ResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateResolvePurchaseDisputeAsync(request); + } + }); + } + + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult ResolvePurchaseDispute(final ResolvePurchaseDisputeRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateResolvePurchaseDisputeAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Attempts to resolve a dispute with the original order's payment provider. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest 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/ResolvePurchaseDispute", 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()); + ResolvePurchaseDisputeResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java index 4ab77138..3a3f2a4a 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java @@ -557,7 +557,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -900,7 +900,7 @@ public static class GetStoreItemsResult { /** * Array of items which can be purchased from this store. */ - @Unordered("ItemId") + @Unordered public ArrayList Store; } @@ -969,7 +969,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1203,7 +1203,7 @@ public static class ListBuildsResult { /** * array of uploaded game server builds */ - @Unordered("BuildId") + @Unordered public ArrayList Builds; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java index 9523251b..3662bb4e 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java @@ -207,7 +207,7 @@ public static class UserInfoResponse { /** * Array of inventory items in the user's current inventory. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..55572b40 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -364,6 +364,64 @@ private static PlayFabResult privateDeleteUsersAsync(final De return pfResult; } + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendLeaderboardAsync(request); + } + }); + } + + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFriendLeaderboard(final GetFriendLeaderboardRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendLeaderboardAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFriendLeaderboardAsync(final GetFriendLeaderboardRequest 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/GetFriendLeaderboard", 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()); + GetLeaderboardResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard */ @@ -2916,6 +2974,180 @@ private static PlayFabResult privateUpdateUse return pfResult; } + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + public static FutureTask> AddFriendAsync(final AddFriendRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateAddFriendAsync(request); + } + }); + } + + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult AddFriend(final AddFriendRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateAddFriendAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateAddFriendAsync(final AddFriendRequest 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/AddFriend", 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()); + EmptyResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFriendsListAsync(final GetFriendsListRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendsListAsync(request); + } + }); + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFriendsList(final GetFriendsListRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFriendsListAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFriendsListAsync(final GetFriendsListRequest 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/GetFriendsList", 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()); + GetFriendsListResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + public static FutureTask> RemoveFriendAsync(final RemoveFriendRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRemoveFriendAsync(request); + } + }); + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RemoveFriend(final RemoveFriendRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRemoveFriendAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Removes the specified friend from the the user's friend list + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRemoveFriendAsync(final RemoveFriendRequest 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/RemoveFriend", 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()); + EmptyResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Informs the PlayFab match-making service that the user specified has left the Game Server Instance */ @@ -3612,6 +3844,122 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetCloudScriptUrlAsync(final GetCloudScriptUrlRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetCloudScriptUrlAsync(request); + } + }); + } + + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetCloudScriptUrl(final GetCloudScriptUrlRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetCloudScriptUrlAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetCloudScriptUrlAsync(final GetCloudScriptUrlRequest 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/GetCloudScriptUrl", 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()); + GetCloudScriptUrlResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + public static FutureTask> RunServerCloudScriptAsync(final RunServerCloudScriptRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRunServerCloudScriptAsync(request); + } + }); + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult RunServerCloudScript(final RunServerCloudScriptRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateRunServerCloudScriptAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateRunServerCloudScriptAsync(final RunServerCloudScriptRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetLogicURL() + "/Server/RunServerCloudScript", 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()); + RunCloudScriptResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index c33e18af..35eeb6e3 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -633,7 +633,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered("ItemId") + @Unordered public ArrayList Catalog; } @@ -706,7 +706,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1179,7 +1179,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered("ItemInstanceId") + @Unordered public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. From 5b068f92c023a5a61f167b09b547b2935e87c1c3 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Tue, 23 Feb 2016 19:05:39 +0000 Subject: [PATCH 2/8] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientAPI.java | 528 ------------------ .../java/com/playfab/PlayFabClientModels.java | 161 ------ .../src/com/playfab/PlayFabClientAPI.java | 528 ------------------ .../src/com/playfab/PlayFabClientModels.java | 161 ------ .../src/com/playfab/PlayFabAdminAPI.java | 116 ---- .../src/com/playfab/PlayFabAdminModels.java | 58 -- .../src/com/playfab/PlayFabClientAPI.java | 528 ------------------ .../src/com/playfab/PlayFabClientModels.java | 161 ------ .../src/com/playfab/PlayFabServerAPI.java | 348 ------------ .../src/com/playfab/PlayFabServerModels.java | 108 ---- .../src/com/playfab/PlayFabAdminAPI.java | 116 ---- .../src/com/playfab/PlayFabAdminModels.java | 58 -- .../src/com/playfab/PlayFabServerAPI.java | 348 ------------ .../src/com/playfab/PlayFabServerModels.java | 108 ---- 14 files changed, 3327 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 6adbc14b..5d0a0654 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -624,67 +624,6 @@ private static PlayFabResult privateLoginWithPlayFabAsync(final Log return pfResult; } - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithPSNAsync(final LoginWithPSNRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithPSN(final LoginWithPSNRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithPSNAsync(final LoginWithPSNRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithPSN", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @@ -746,67 +685,6 @@ private static PlayFabResult privateLoginWithSteamAsync(final Login return pfResult; } - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithXboxAsync(final LoginWithXboxRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithXbox(final LoginWithXboxRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithXboxAsync(final LoginWithXboxRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithXbox", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address. */ @@ -1216,64 +1094,6 @@ private static PlayFabResult privateGetPla return pfResult; } - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayFabIDsFromPSNAccountIDs(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayFabIDsFromPSNAccountIDs", 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()); - GetPlayFabIDsFromPSNAccountIDsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile IDs for the user accounts, available as SteamId in the Steamworks Community API calls. */ @@ -1796,64 +1616,6 @@ private static PlayFabResult privateLinkKongregateA return pfResult; } - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkPSNAccountAsync(final LinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkPSNAccount(final LinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkPSNAccountAsync(final LinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkPSNAccount", 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()); - LinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account */ @@ -1912,64 +1674,6 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkXboxAccountAsync(final LinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkXboxAccount(final LinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkXboxAccountAsync(final LinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkXboxAccount", 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()); - LinkXboxAccountResult 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 */ @@ -2433,64 +2137,6 @@ private static PlayFabResult privateUnlinkKongreg return pfResult; } - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkPSNAccount(final UnlinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkPSNAccount", 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()); - UnlinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Unlinks the related Steam account from the user's PlayFab account */ @@ -2549,64 +2195,6 @@ private static PlayFabResult privateUnlinkSteamAccount return pfResult; } - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkXboxAccount(final UnlinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkXboxAccount", 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()); - UnlinkXboxAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates the title specific display name for the user */ @@ -5797,122 +5385,6 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static FutureTask> ConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ConsumePSNEntitlements(final ConsumePSNEntitlementsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ConsumePSNEntitlements", 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()); - ConsumePSNEntitlementsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static FutureTask> RefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RefreshPSNAuthToken(final RefreshPSNAuthTokenRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/RefreshPSNAuthToken", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 68d64914..925793e0 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -432,27 +432,6 @@ public static class ConsumeItemResult { } - public static class ConsumePSNEntitlementsRequest { - /** - * Which catalog to match granted entitlements against. If null, defaults to title default catalog - */ - public String CatalogVersion; - /** - * Id of the PSN service label to consume entitlements from - */ - public Integer ServiceLabel; - - } - - public static class ConsumePSNEntitlementsResult { - /** - * Array of items granted to the player as a result of consuming entitlements. - */ - @Unordered - public ArrayList ItemsGranted; - - } - public static class CreateSharedGroupRequest { /** * Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). @@ -1340,26 +1319,6 @@ public static class GetPlayFabIDsFromKongregateIDsResult { } - public static class GetPlayFabIDsFromPSNAccountIDsRequest { - /** - * Array of unique PlayStation Network identifiers for which the title needs to get PlayFab identifiers. - */ - public ArrayList PSNAccountIDs; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class GetPlayFabIDsFromPSNAccountIDsResult { - /** - * Mapping of PlayStation Network identifiers to PlayFab identifiers. - */ - public ArrayList Data; - - } - public static class GetPlayFabIDsFromSteamIDsRequest { /** * Deprecated: Please use SteamStringIDs @@ -1939,26 +1898,6 @@ public static class LinkKongregateAccountResult { } - public static class LinkPSNAccountRequest { - /** - * Authentication code provided by the PlayStation Network. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class LinkPSNAccountResult { - - } - public static class LinkSteamAccountRequest { /** * Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte 0x08 should become "08"). @@ -1971,18 +1910,6 @@ public static class LinkSteamAccountResult { } - public static class LinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class LinkXboxAccountResult { - - } - public static class ListUsersCharactersRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -2215,30 +2142,6 @@ public static class LoginWithPlayFabRequest { } - public static class LoginWithPSNRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Auth code provided by the PSN OAuth provider. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - /** - * Automatically create a PlayFab account if one is not currently linked to this PSN account. - */ - public Boolean CreateAccount; - - } - public static class LoginWithSteamRequest { /** * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected @@ -2255,22 +2158,6 @@ public static class LoginWithSteamRequest { } - public static class LoginWithXboxRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - /** - * Automatically create a PlayFab account if one is not currently linked to this Xbox Live account. - */ - public Boolean CreateAccount; - - } - public static class MatchmakeRequest { /** * build version to match against [Note: Required if LobbyId is not specified] @@ -2485,18 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PSNAccountPlayFabIdPair { - /** - * Unique PlayStation Network identifier for a user. - */ - public String PSNAccountId; - /** - * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation Network identifier. - */ - public String PlayFabId; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2553,22 +2428,6 @@ public static class RedeemCouponResult { } - public static class RefreshPSNAuthTokenRequest { - /** - * Auth code returned by PSN OAuth system. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - public static enum Region { USCentral, USEast, @@ -3200,14 +3059,6 @@ public static class UnlinkKongregateAccountResult { } - public static class UnlinkPSNAccountRequest { - - } - - public static class UnlinkPSNAccountResult { - - } - public static class UnlinkSteamAccountRequest { } @@ -3216,18 +3067,6 @@ public static class UnlinkSteamAccountResult { } - public static class UnlinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class UnlinkXboxAccountResult { - - } - public static class UnlockContainerInstanceRequest { /** * Unique PlayFab assigned ID for a specific character owned by a user diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index 291f1822..30a5fbe5 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -623,67 +623,6 @@ private static PlayFabResult privateLoginWithPlayFabAsync(final Log return pfResult; } - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithPSNAsync(final LoginWithPSNRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithPSN(final LoginWithPSNRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithPSNAsync(final LoginWithPSNRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithPSN", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @@ -745,67 +684,6 @@ private static PlayFabResult privateLoginWithSteamAsync(final Login return pfResult; } - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithXboxAsync(final LoginWithXboxRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithXbox(final LoginWithXboxRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithXboxAsync(final LoginWithXboxRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithXbox", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address. */ @@ -1215,64 +1093,6 @@ private static PlayFabResult privateGetPla return pfResult; } - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayFabIDsFromPSNAccountIDs(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayFabIDsFromPSNAccountIDs", 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()); - GetPlayFabIDsFromPSNAccountIDsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile IDs for the user accounts, available as SteamId in the Steamworks Community API calls. */ @@ -1795,64 +1615,6 @@ private static PlayFabResult privateLinkKongregateA return pfResult; } - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkPSNAccountAsync(final LinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkPSNAccount(final LinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkPSNAccountAsync(final LinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkPSNAccount", 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()); - LinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account */ @@ -1911,64 +1673,6 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkXboxAccountAsync(final LinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkXboxAccount(final LinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkXboxAccountAsync(final LinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkXboxAccount", 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()); - LinkXboxAccountResult 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 */ @@ -2432,64 +2136,6 @@ private static PlayFabResult privateUnlinkKongreg return pfResult; } - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkPSNAccount(final UnlinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkPSNAccount", 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()); - UnlinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Unlinks the related Steam account from the user's PlayFab account */ @@ -2548,64 +2194,6 @@ private static PlayFabResult privateUnlinkSteamAccount return pfResult; } - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkXboxAccount(final UnlinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkXboxAccount", 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()); - UnlinkXboxAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates the title specific display name for the user */ @@ -5796,122 +5384,6 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static FutureTask> ConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ConsumePSNEntitlements(final ConsumePSNEntitlementsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ConsumePSNEntitlements", 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()); - ConsumePSNEntitlementsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static FutureTask> RefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RefreshPSNAuthToken(final RefreshPSNAuthTokenRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/RefreshPSNAuthToken", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. */ diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 68d64914..925793e0 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -432,27 +432,6 @@ public static class ConsumeItemResult { } - public static class ConsumePSNEntitlementsRequest { - /** - * Which catalog to match granted entitlements against. If null, defaults to title default catalog - */ - public String CatalogVersion; - /** - * Id of the PSN service label to consume entitlements from - */ - public Integer ServiceLabel; - - } - - public static class ConsumePSNEntitlementsResult { - /** - * Array of items granted to the player as a result of consuming entitlements. - */ - @Unordered - public ArrayList ItemsGranted; - - } - public static class CreateSharedGroupRequest { /** * Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). @@ -1340,26 +1319,6 @@ public static class GetPlayFabIDsFromKongregateIDsResult { } - public static class GetPlayFabIDsFromPSNAccountIDsRequest { - /** - * Array of unique PlayStation Network identifiers for which the title needs to get PlayFab identifiers. - */ - public ArrayList PSNAccountIDs; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class GetPlayFabIDsFromPSNAccountIDsResult { - /** - * Mapping of PlayStation Network identifiers to PlayFab identifiers. - */ - public ArrayList Data; - - } - public static class GetPlayFabIDsFromSteamIDsRequest { /** * Deprecated: Please use SteamStringIDs @@ -1939,26 +1898,6 @@ public static class LinkKongregateAccountResult { } - public static class LinkPSNAccountRequest { - /** - * Authentication code provided by the PlayStation Network. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class LinkPSNAccountResult { - - } - public static class LinkSteamAccountRequest { /** * Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte 0x08 should become "08"). @@ -1971,18 +1910,6 @@ public static class LinkSteamAccountResult { } - public static class LinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class LinkXboxAccountResult { - - } - public static class ListUsersCharactersRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -2215,30 +2142,6 @@ public static class LoginWithPlayFabRequest { } - public static class LoginWithPSNRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Auth code provided by the PSN OAuth provider. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - /** - * Automatically create a PlayFab account if one is not currently linked to this PSN account. - */ - public Boolean CreateAccount; - - } - public static class LoginWithSteamRequest { /** * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected @@ -2255,22 +2158,6 @@ public static class LoginWithSteamRequest { } - public static class LoginWithXboxRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - /** - * Automatically create a PlayFab account if one is not currently linked to this Xbox Live account. - */ - public Boolean CreateAccount; - - } - public static class MatchmakeRequest { /** * build version to match against [Note: Required if LobbyId is not specified] @@ -2485,18 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PSNAccountPlayFabIdPair { - /** - * Unique PlayStation Network identifier for a user. - */ - public String PSNAccountId; - /** - * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation Network identifier. - */ - public String PlayFabId; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2553,22 +2428,6 @@ public static class RedeemCouponResult { } - public static class RefreshPSNAuthTokenRequest { - /** - * Auth code returned by PSN OAuth system. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - public static enum Region { USCentral, USEast, @@ -3200,14 +3059,6 @@ public static class UnlinkKongregateAccountResult { } - public static class UnlinkPSNAccountRequest { - - } - - public static class UnlinkPSNAccountResult { - - } - public static class UnlinkSteamAccountRequest { } @@ -3216,18 +3067,6 @@ public static class UnlinkSteamAccountResult { } - public static class UnlinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class UnlinkXboxAccountResult { - - } - public static class UnlockContainerInstanceRequest { /** * Unique PlayFab assigned ID for a specific character owned by a user diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java index a1483fe2..95dececd 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java @@ -944,64 +944,6 @@ private static PlayFabResult privateIncre return pfResult; } - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - public static FutureTask> RefundPurchaseAsync(final RefundPurchaseRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefundPurchaseAsync(request); - } - }); - } - - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RefundPurchase(final RefundPurchaseRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefundPurchaseAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRefundPurchaseAsync(final RefundPurchaseRequest 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/RefundPurchase", 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()); - RefundPurchaseResponse result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Completely removes all statistics for the specified user, for the current game */ @@ -1060,64 +1002,6 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - public static FutureTask> ResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateResolvePurchaseDisputeAsync(request); - } - }); - } - - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ResolvePurchaseDispute(final ResolvePurchaseDisputeRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateResolvePurchaseDisputeAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest 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/ResolvePurchaseDispute", 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()); - ResolvePurchaseDisputeResponse result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java index 3a3f2a4a..c6c0d3b7 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java @@ -1445,30 +1445,6 @@ public static class RandomResultTableListing { } - public static class RefundPurchaseRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * Unique order ID for the purchase in question. - */ - public String OrderId; - /** - * Reason for refund. In the case of Facebook this must match one of their refund or dispute resolution enums (See: https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) - */ - public String Reason; - - } - - public static class RefundPurchaseResponse { - /** - * The order's updated purchase status. - */ - public String PurchaseStatus; - - } - public static enum Region { USCentral, USEast, @@ -1527,40 +1503,6 @@ public static class ResetUserStatisticsResult { } - public static enum ResolutionOutcome { - Revoke, - Reinstate, - Manual - } - - public static class ResolvePurchaseDisputeRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * Unique order ID for the purchase in question. - */ - public String OrderId; - /** - * Reason for refund. In the case of Facebook this must match one of their refund or dispute resolution enums (See: https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) - */ - public String Reason; - /** - * Enum for the desired purchase result state after notifying the payment provider. Valid values are Revoke, Reinstate and Manual. Manual will cause no change to the order state. - */ - public ResolutionOutcome Outcome; - - } - - public static class ResolvePurchaseDisputeResponse { - /** - * The order's updated purchase status. - */ - public String PurchaseStatus; - - } - public static class ResultTableNode { /** * Whether this entry in the table is an item or a link to another table diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index 291f1822..30a5fbe5 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -623,67 +623,6 @@ private static PlayFabResult privateLoginWithPlayFabAsync(final Log return pfResult; } - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithPSNAsync(final LoginWithPSNRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithPSN(final LoginWithPSNRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithPSNAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithPSNAsync(final LoginWithPSNRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithPSN", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for API calls which require an authenticated user */ @@ -745,67 +684,6 @@ private static PlayFabResult privateLoginWithSteamAsync(final Login return pfResult; } - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static FutureTask> LoginWithXboxAsync(final LoginWithXboxRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LoginWithXbox(final LoginWithXboxRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLoginWithXboxAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLoginWithXboxAsync(final LoginWithXboxRequest request) throws Exception { - request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId; - if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LoginWithXbox", request, null, null); - 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()); - LoginResult result = resultData.data; - _authKey = result.SessionTicket != null ? result.SessionTicket : _authKey; - MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution); - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address. */ @@ -1215,64 +1093,6 @@ private static PlayFabResult privateGetPla return pfResult; } - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayFabIDsFromPSNAccountIDs(final GetPlayFabIDsFromPSNAccountIDsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayFabIDsFromPSNAccountIDsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayFabIDsFromPSNAccountIDs", 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()); - GetPlayFabIDsFromPSNAccountIDsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile IDs for the user accounts, available as SteamId in the Steamworks Community API calls. */ @@ -1795,64 +1615,6 @@ private static PlayFabResult privateLinkKongregateA return pfResult; } - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkPSNAccountAsync(final LinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkPSNAccount(final LinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkPSNAccountAsync(final LinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkPSNAccount", 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()); - LinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account */ @@ -1911,64 +1673,6 @@ private static PlayFabResult privateLinkSteamAccountAsyn return pfResult; } - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> LinkXboxAccountAsync(final LinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult LinkXboxAccount(final LinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateLinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Links the Xbox Live account associated with the provided access code to the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateLinkXboxAccountAsync(final LinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/LinkXboxAccount", 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()); - LinkXboxAccountResult 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 */ @@ -2432,64 +2136,6 @@ private static PlayFabResult privateUnlinkKongreg return pfResult; } - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkPSNAccount(final UnlinkPSNAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkPSNAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related PSN account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkPSNAccount", 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()); - UnlinkPSNAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Unlinks the related Steam account from the user's PlayFab account */ @@ -2548,64 +2194,6 @@ private static PlayFabResult privateUnlinkSteamAccount return pfResult; } - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static FutureTask> UnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - public static PlayFabResult UnlinkXboxAccount(final UnlinkXboxAccountRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateUnlinkXboxAccountAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Unlinks the related Xbox Live account from the user's PlayFab account - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateUnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlinkXboxAccount", 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()); - UnlinkXboxAccountResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates the title specific display name for the user */ @@ -5796,122 +5384,6 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static FutureTask> ConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ConsumePSNEntitlements(final ConsumePSNEntitlementsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateConsumePSNEntitlementsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/ConsumePSNEntitlements", 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()); - ConsumePSNEntitlementsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static FutureTask> RefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RefreshPSNAuthToken(final RefreshPSNAuthTokenRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefreshPSNAuthTokenAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Uses the supplied OAuth code to refresh the internally cached player PSN auth token - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/RefreshPSNAuthToken", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 68d64914..925793e0 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -432,27 +432,6 @@ public static class ConsumeItemResult { } - public static class ConsumePSNEntitlementsRequest { - /** - * Which catalog to match granted entitlements against. If null, defaults to title default catalog - */ - public String CatalogVersion; - /** - * Id of the PSN service label to consume entitlements from - */ - public Integer ServiceLabel; - - } - - public static class ConsumePSNEntitlementsResult { - /** - * Array of items granted to the player as a result of consuming entitlements. - */ - @Unordered - public ArrayList ItemsGranted; - - } - public static class CreateSharedGroupRequest { /** * Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). @@ -1340,26 +1319,6 @@ public static class GetPlayFabIDsFromKongregateIDsResult { } - public static class GetPlayFabIDsFromPSNAccountIDsRequest { - /** - * Array of unique PlayStation Network identifiers for which the title needs to get PlayFab identifiers. - */ - public ArrayList PSNAccountIDs; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class GetPlayFabIDsFromPSNAccountIDsResult { - /** - * Mapping of PlayStation Network identifiers to PlayFab identifiers. - */ - public ArrayList Data; - - } - public static class GetPlayFabIDsFromSteamIDsRequest { /** * Deprecated: Please use SteamStringIDs @@ -1939,26 +1898,6 @@ public static class LinkKongregateAccountResult { } - public static class LinkPSNAccountRequest { - /** - * Authentication code provided by the PlayStation Network. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - - public static class LinkPSNAccountResult { - - } - public static class LinkSteamAccountRequest { /** * Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte 0x08 should become "08"). @@ -1971,18 +1910,6 @@ public static class LinkSteamAccountResult { } - public static class LinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class LinkXboxAccountResult { - - } - public static class ListUsersCharactersRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -2215,30 +2142,6 @@ public static class LoginWithPlayFabRequest { } - public static class LoginWithPSNRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Auth code provided by the PSN OAuth provider. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - /** - * Automatically create a PlayFab account if one is not currently linked to this PSN account. - */ - public Boolean CreateAccount; - - } - public static class LoginWithSteamRequest { /** * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected @@ -2255,22 +2158,6 @@ public static class LoginWithSteamRequest { } - public static class LoginWithXboxRequest { - /** - * Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected - */ - public String TitleId; - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - /** - * Automatically create a PlayFab account if one is not currently linked to this Xbox Live account. - */ - public Boolean CreateAccount; - - } - public static class MatchmakeRequest { /** * build version to match against [Note: Required if LobbyId is not specified] @@ -2485,18 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PSNAccountPlayFabIdPair { - /** - * Unique PlayStation Network identifier for a user. - */ - public String PSNAccountId; - /** - * Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation Network identifier. - */ - public String PlayFabId; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2553,22 +2428,6 @@ public static class RedeemCouponResult { } - public static class RefreshPSNAuthTokenRequest { - /** - * Auth code returned by PSN OAuth system. - */ - public String AuthCode; - /** - * Redirect URI supplied to PSN when requesting an auth code - */ - public String RedirectUri; - /** - * Id of the PSN issuer environment. If null, defaults to 256 (production) - */ - public Integer IssuerId; - - } - public static enum Region { USCentral, USEast, @@ -3200,14 +3059,6 @@ public static class UnlinkKongregateAccountResult { } - public static class UnlinkPSNAccountRequest { - - } - - public static class UnlinkPSNAccountResult { - - } - public static class UnlinkSteamAccountRequest { } @@ -3216,18 +3067,6 @@ public static class UnlinkSteamAccountResult { } - public static class UnlinkXboxAccountRequest { - /** - * Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). - */ - public String XboxToken; - - } - - public static class UnlinkXboxAccountResult { - - } - public static class UnlockContainerInstanceRequest { /** * Unique PlayFab assigned ID for a specific character owned by a user diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index 55572b40..ec70233c 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -364,64 +364,6 @@ private static PlayFabResult privateDeleteUsersAsync(final De return pfResult; } - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendLeaderboardAsync(request); - } - }); - } - - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetFriendLeaderboard(final GetFriendLeaderboardRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendLeaderboardAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetFriendLeaderboardAsync(final GetFriendLeaderboardRequest 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/GetFriendLeaderboard", 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()); - GetLeaderboardResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard */ @@ -2974,180 +2916,6 @@ private static PlayFabResult privateUpdateUse return pfResult; } - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - public static FutureTask> AddFriendAsync(final AddFriendRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateAddFriendAsync(request); - } - }); - } - - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult AddFriend(final AddFriendRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateAddFriendAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateAddFriendAsync(final AddFriendRequest 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/AddFriend", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetFriendsListAsync(final GetFriendsListRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendsListAsync(request); - } - }); - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetFriendsList(final GetFriendsListRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendsListAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetFriendsListAsync(final GetFriendsListRequest 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/GetFriendsList", 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()); - GetFriendsListResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - public static FutureTask> RemoveFriendAsync(final RemoveFriendRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRemoveFriendAsync(request); - } - }); - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RemoveFriend(final RemoveFriendRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRemoveFriendAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRemoveFriendAsync(final RemoveFriendRequest 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/RemoveFriend", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Informs the PlayFab match-making service that the user specified has left the Game Server Instance */ @@ -3844,122 +3612,6 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetCloudScriptUrlAsync(final GetCloudScriptUrlRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetCloudScriptUrlAsync(request); - } - }); - } - - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetCloudScriptUrl(final GetCloudScriptUrlRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetCloudScriptUrlAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetCloudScriptUrlAsync(final GetCloudScriptUrlRequest 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/GetCloudScriptUrl", 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()); - GetCloudScriptUrlResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - public static FutureTask> RunServerCloudScriptAsync(final RunServerCloudScriptRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRunServerCloudScriptAsync(request); - } - }); - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RunServerCloudScript(final RunServerCloudScriptRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRunServerCloudScriptAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRunServerCloudScriptAsync(final RunServerCloudScriptRequest request) throws Exception { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetLogicURL() + "/Server/RunServerCloudScript", 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()); - RunCloudScriptResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 35eeb6e3..1e856320 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -25,30 +25,6 @@ public static class AddCharacterVirtualCurrencyRequest { } - public static class AddFriendRequest { - /** - * PlayFab identifier of the player to add a new friend. - */ - public String PlayFabId; - /** - * The PlayFab identifier of the user being added. - */ - public String FriendPlayFabId; - /** - * The PlayFab username of the user being added - */ - public String FriendUsername; - /** - * Email address of the user being added. - */ - public String FriendEmail; - /** - * Title-specific display name of the user to being added. - */ - public String FriendTitleDisplayName; - - } - public static class AddSharedGroupMembersRequest { /** * Unique identifier for the shared group. @@ -823,58 +799,6 @@ public static class GetContentDownloadUrlResult { } - public static class GetFriendLeaderboardRequest { - /** - * The player whose friend leaderboard to get - */ - public String PlayFabId; - /** - * Statistic used to rank friends for this leaderboard. - */ - public String StatisticName; - /** - * Position in the leaderboard to start this listing (defaults to the first entry). - */ - public Integer StartPosition; - /** - * Maximum number of entries to retrieve. - */ - public Integer MaxResultsCount; - /** - * Indicates whether Steam service friends should be included in the response. Default is true. - */ - public Boolean IncludeSteamFriends; - /** - * Indicates whether Facebook friends should be included in the response. Default is true. - */ - public Boolean IncludeFacebookFriends; - - } - - public static class GetFriendsListRequest { - /** - * PlayFab identifier of the player whose friend list to get. - */ - public String PlayFabId; - /** - * Indicates whether Steam service friends should be included in the response. Default is true. - */ - public Boolean IncludeSteamFriends; - /** - * Indicates whether Facebook friends should be included in the response. Default is true. - */ - public Boolean IncludeFacebookFriends; - - } - - public static class GetFriendsListResult { - /** - * Array of friends found. - */ - public ArrayList Friends; - - } - public static class GetLeaderboardAroundCharacterRequest { /** * Unique identifier for the title-specific statistic for the leaderboard. @@ -1769,18 +1693,6 @@ public static class RedeemMatchmakerTicketResult { } - public static class RemoveFriendRequest { - /** - * PlayFab identifier of the friend account which is to be removed. - */ - public String FriendPlayFabId; - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - - } - public static class RemoveSharedGroupMembersRequest { /** * Unique identifier for the shared group. @@ -1881,26 +1793,6 @@ public static class RunCloudScriptResult { } - public static class RunServerCloudScriptRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * server action to trigger - */ - public String ActionId; - /** - * parameters to pass into the action (If you use this, don't use ParamsEncoded) - */ - public Object Params; - /** - * json-encoded parameters to pass into the action (If you use this, don't use Params) - */ - public String ParamsEncoded; - - } - public static class SendPushNotificationRequest { /** * PlayFabId of the recipient of the push notification. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java index a1483fe2..95dececd 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java @@ -944,64 +944,6 @@ private static PlayFabResult privateIncre return pfResult; } - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - public static FutureTask> RefundPurchaseAsync(final RefundPurchaseRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefundPurchaseAsync(request); - } - }); - } - - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RefundPurchase(final RefundPurchaseRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRefundPurchaseAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Attempts to process an order refund through the original real money payment provider. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRefundPurchaseAsync(final RefundPurchaseRequest 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/RefundPurchase", 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()); - RefundPurchaseResponse result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Completely removes all statistics for the specified user, for the current game */ @@ -1060,64 +1002,6 @@ private static PlayFabResult privateResetUserStatisti return pfResult; } - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - public static FutureTask> ResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateResolvePurchaseDisputeAsync(request); - } - }); - } - - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult ResolvePurchaseDispute(final ResolvePurchaseDisputeRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateResolvePurchaseDisputeAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Attempts to resolve a dispute with the original order's payment provider. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateResolvePurchaseDisputeAsync(final ResolvePurchaseDisputeRequest 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/ResolvePurchaseDispute", 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()); - ResolvePurchaseDisputeResponse result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java index 3a3f2a4a..c6c0d3b7 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java @@ -1445,30 +1445,6 @@ public static class RandomResultTableListing { } - public static class RefundPurchaseRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * Unique order ID for the purchase in question. - */ - public String OrderId; - /** - * Reason for refund. In the case of Facebook this must match one of their refund or dispute resolution enums (See: https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) - */ - public String Reason; - - } - - public static class RefundPurchaseResponse { - /** - * The order's updated purchase status. - */ - public String PurchaseStatus; - - } - public static enum Region { USCentral, USEast, @@ -1527,40 +1503,6 @@ public static class ResetUserStatisticsResult { } - public static enum ResolutionOutcome { - Revoke, - Reinstate, - Manual - } - - public static class ResolvePurchaseDisputeRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * Unique order ID for the purchase in question. - */ - public String OrderId; - /** - * Reason for refund. In the case of Facebook this must match one of their refund or dispute resolution enums (See: https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) - */ - public String Reason; - /** - * Enum for the desired purchase result state after notifying the payment provider. Valid values are Revoke, Reinstate and Manual. Manual will cause no change to the order state. - */ - public ResolutionOutcome Outcome; - - } - - public static class ResolvePurchaseDisputeResponse { - /** - * The order's updated purchase status. - */ - public String PurchaseStatus; - - } - public static class ResultTableNode { /** * Whether this entry in the table is an item or a link to another table diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index 55572b40..ec70233c 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -364,64 +364,6 @@ private static PlayFabResult privateDeleteUsersAsync(final De return pfResult; } - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendLeaderboardAsync(request); - } - }); - } - - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetFriendLeaderboard(final GetFriendLeaderboardRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendLeaderboardAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetFriendLeaderboardAsync(final GetFriendLeaderboardRequest 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/GetFriendLeaderboard", 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()); - GetLeaderboardResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard */ @@ -2974,180 +2916,6 @@ private static PlayFabResult privateUpdateUse return pfResult; } - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - public static FutureTask> AddFriendAsync(final AddFriendRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateAddFriendAsync(request); - } - }); - } - - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult AddFriend(final AddFriendRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateAddFriendAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateAddFriendAsync(final AddFriendRequest 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/AddFriend", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetFriendsListAsync(final GetFriendsListRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendsListAsync(request); - } - }); - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetFriendsList(final GetFriendsListRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetFriendsListAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetFriendsListAsync(final GetFriendsListRequest 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/GetFriendsList", 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()); - GetFriendsListResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - public static FutureTask> RemoveFriendAsync(final RemoveFriendRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRemoveFriendAsync(request); - } - }); - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RemoveFriend(final RemoveFriendRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRemoveFriendAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Removes the specified friend from the the user's friend list - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRemoveFriendAsync(final RemoveFriendRequest 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/RemoveFriend", 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()); - EmptyResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Informs the PlayFab match-making service that the user specified has left the Game Server Instance */ @@ -3844,122 +3612,6 @@ private static PlayFabResult privateUpdateSharedGro return pfResult; } - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetCloudScriptUrlAsync(final GetCloudScriptUrlRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetCloudScriptUrlAsync(request); - } - }); - } - - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetCloudScriptUrl(final GetCloudScriptUrlRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetCloudScriptUrlAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetCloudScriptUrlAsync(final GetCloudScriptUrlRequest 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/GetCloudScriptUrl", 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()); - GetCloudScriptUrlResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - public static FutureTask> RunServerCloudScriptAsync(final RunServerCloudScriptRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRunServerCloudScriptAsync(request); - } - }); - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult RunServerCloudScript(final RunServerCloudScriptRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateRunServerCloudScriptAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateRunServerCloudScriptAsync(final RunServerCloudScriptRequest request) throws Exception { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetLogicURL() + "/Server/RunServerCloudScript", 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()); - RunCloudScriptResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 35eeb6e3..1e856320 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -25,30 +25,6 @@ public static class AddCharacterVirtualCurrencyRequest { } - public static class AddFriendRequest { - /** - * PlayFab identifier of the player to add a new friend. - */ - public String PlayFabId; - /** - * The PlayFab identifier of the user being added. - */ - public String FriendPlayFabId; - /** - * The PlayFab username of the user being added - */ - public String FriendUsername; - /** - * Email address of the user being added. - */ - public String FriendEmail; - /** - * Title-specific display name of the user to being added. - */ - public String FriendTitleDisplayName; - - } - public static class AddSharedGroupMembersRequest { /** * Unique identifier for the shared group. @@ -823,58 +799,6 @@ public static class GetContentDownloadUrlResult { } - public static class GetFriendLeaderboardRequest { - /** - * The player whose friend leaderboard to get - */ - public String PlayFabId; - /** - * Statistic used to rank friends for this leaderboard. - */ - public String StatisticName; - /** - * Position in the leaderboard to start this listing (defaults to the first entry). - */ - public Integer StartPosition; - /** - * Maximum number of entries to retrieve. - */ - public Integer MaxResultsCount; - /** - * Indicates whether Steam service friends should be included in the response. Default is true. - */ - public Boolean IncludeSteamFriends; - /** - * Indicates whether Facebook friends should be included in the response. Default is true. - */ - public Boolean IncludeFacebookFriends; - - } - - public static class GetFriendsListRequest { - /** - * PlayFab identifier of the player whose friend list to get. - */ - public String PlayFabId; - /** - * Indicates whether Steam service friends should be included in the response. Default is true. - */ - public Boolean IncludeSteamFriends; - /** - * Indicates whether Facebook friends should be included in the response. Default is true. - */ - public Boolean IncludeFacebookFriends; - - } - - public static class GetFriendsListResult { - /** - * Array of friends found. - */ - public ArrayList Friends; - - } - public static class GetLeaderboardAroundCharacterRequest { /** * Unique identifier for the title-specific statistic for the leaderboard. @@ -1769,18 +1693,6 @@ public static class RedeemMatchmakerTicketResult { } - public static class RemoveFriendRequest { - /** - * PlayFab identifier of the friend account which is to be removed. - */ - public String FriendPlayFabId; - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - - } - public static class RemoveSharedGroupMembersRequest { /** * Unique identifier for the shared group. @@ -1881,26 +1793,6 @@ public static class RunCloudScriptResult { } - public static class RunServerCloudScriptRequest { - /** - * Unique PlayFab assigned ID of the user on whom the operation will be performed. - */ - public String PlayFabId; - /** - * server action to trigger - */ - public String ActionId; - /** - * parameters to pass into the action (If you use this, don't use ParamsEncoded) - */ - public Object Params; - /** - * json-encoded parameters to pass into the action (If you use this, don't use Params) - */ - public String ParamsEncoded; - - } - public static class SendPushNotificationRequest { /** * PlayFabId of the recipient of the push notification. From 41fccb5e1d2ceb3ba041c8694090b0902ebc073e Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Tue, 23 Feb 2016 19:38:26 +0000 Subject: [PATCH 3/8] Automated build from Jenkins --- .../src/main/java/com/playfab/PlayFabClientModels.java | 10 +++++----- .../src/com/playfab/PlayFabClientModels.java | 10 +++++----- PlayFabSDK/src/com/playfab/PlayFabAdminModels.java | 8 ++++---- PlayFabSDK/src/com/playfab/PlayFabClientModels.java | 10 +++++----- .../src/com/playfab/PlayFabMatchmakerModels.java | 2 +- PlayFabSDK/src/com/playfab/PlayFabServerModels.java | 6 +++--- .../src/com/playfab/PlayFabAdminModels.java | 8 ++++---- .../src/com/playfab/PlayFabMatchmakerModels.java | 2 +- .../src/com/playfab/PlayFabServerModels.java | 6 +++--- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 925793e0..49102496 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -813,7 +813,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -882,7 +882,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1435,7 +1435,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered + @Unordered("ItemId") public ArrayList Store; } @@ -1552,7 +1552,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1617,7 +1617,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 925793e0..49102496 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -813,7 +813,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -882,7 +882,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1435,7 +1435,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered + @Unordered("ItemId") public ArrayList Store; } @@ -1552,7 +1552,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1617,7 +1617,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java index c6c0d3b7..927feb55 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java @@ -557,7 +557,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -900,7 +900,7 @@ public static class GetStoreItemsResult { /** * Array of items which can be purchased from this store. */ - @Unordered + @Unordered("ItemId") public ArrayList Store; } @@ -969,7 +969,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1203,7 +1203,7 @@ public static class ListBuildsResult { /** * array of uploaded game server builds */ - @Unordered + @Unordered("BuildId") public ArrayList Builds; } diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 925793e0..49102496 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -813,7 +813,7 @@ public static class GetCatalogItemsResult { /** * Array of inventory objects. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -882,7 +882,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1435,7 +1435,7 @@ public static class GetStoreItemsResult { /** * Array of store items. */ - @Unordered + @Unordered("ItemId") public ArrayList Store; } @@ -1552,7 +1552,7 @@ public static class GetUserCombinedInfoResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1617,7 +1617,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java b/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java index 3662bb4e..9523251b 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabMatchmakerModels.java @@ -207,7 +207,7 @@ public static class UserInfoResponse { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 1e856320..094c4e9d 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -609,7 +609,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -682,7 +682,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1103,7 +1103,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java index c6c0d3b7..927feb55 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java @@ -557,7 +557,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -900,7 +900,7 @@ public static class GetStoreItemsResult { /** * Array of items which can be purchased from this store. */ - @Unordered + @Unordered("ItemId") public ArrayList Store; } @@ -969,7 +969,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. @@ -1203,7 +1203,7 @@ public static class ListBuildsResult { /** * array of uploaded game server builds */ - @Unordered + @Unordered("BuildId") public ArrayList Builds; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java index 3662bb4e..9523251b 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabMatchmakerModels.java @@ -207,7 +207,7 @@ public static class UserInfoResponse { /** * Array of inventory items in the user's current inventory. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 1e856320..094c4e9d 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -609,7 +609,7 @@ public static class GetCatalogItemsResult { /** * Array of items which can be purchased. */ - @Unordered + @Unordered("ItemId") public ArrayList Catalog; } @@ -682,7 +682,7 @@ public static class GetCharacterInventoryResult { /** * Array of inventory items belonging to the character. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the character. @@ -1103,7 +1103,7 @@ public static class GetUserInventoryResult { /** * Array of inventory items belonging to the user. */ - @Unordered + @Unordered("ItemInstanceId") public ArrayList Inventory; /** * Array of virtual currency balance(s) belonging to the user. From 4260aa5f3f2fc66998bd98d50eb98cd7ff95c48c Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Wed, 24 Feb 2016 16:58:58 +0000 Subject: [PATCH 4/8] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../java/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../src/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../src/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabServerAPI.java | 58 +++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 60 +++++++++++++++++ .../src/com/playfab/PlayFabServerAPI.java | 58 +++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 60 +++++++++++++++++ 10 files changed, 602 insertions(+), 12 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 5d0a0654..641450f1 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -2602,7 +2602,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2614,7 +2614,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2632,7 +2632,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2659,6 +2659,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 49102496..615634d9 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index 30a5fbe5..c4c187a9 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,6 +2658,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 49102496..615634d9 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index 30a5fbe5..c4c187a9 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,6 +2658,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 49102496..615634d9 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..1d0f58b9 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,6 +538,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 094c4e9d..5dfb4afa 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -912,6 +912,10 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -927,6 +931,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1641,6 +1661,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1865,6 +1913,18 @@ public static class SharedGroupDataRecord { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..1d0f58b9 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,6 +538,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 094c4e9d..5dfb4afa 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -912,6 +912,10 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -927,6 +931,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1641,6 +1661,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1865,6 +1913,18 @@ public static class SharedGroupDataRecord { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic From c2d4f76fbb97bd355c900835fa9748f8be10d0a1 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Sat, 27 Feb 2016 00:45:35 +0000 Subject: [PATCH 5/8] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientAPI.java | 64 +------------------ .../java/com/playfab/PlayFabClientModels.java | 64 +------------------ .../src/com/playfab/PlayFabClientAPI.java | 64 +------------------ .../src/com/playfab/PlayFabClientModels.java | 64 +------------------ .../src/com/playfab/PlayFabClientAPI.java | 64 +------------------ .../src/com/playfab/PlayFabClientModels.java | 64 +------------------ .../src/com/playfab/PlayFabServerAPI.java | 58 ----------------- .../src/com/playfab/PlayFabServerModels.java | 62 +----------------- .../src/com/playfab/PlayFabServerAPI.java | 58 ----------------- .../src/com/playfab/PlayFabServerModels.java | 62 +----------------- 10 files changed, 17 insertions(+), 607 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 641450f1..5d0a0654 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -2602,7 +2602,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2614,7 +2614,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2632,7 +2632,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2659,64 +2659,6 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); - GetPlayerStatisticVersionsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 615634d9..be8ed361 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1221,13 +1221,9 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return (current version will be returned for each) + * statistics to return */ public ArrayList StatisticNames; - /** - * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) - */ - public ArrayList StatisticNameVersions; } @@ -1239,22 +1235,6 @@ public static class GetPlayerStatisticsResult { } - public static class GetPlayerStatisticVersionsRequest { - /** - * unique name of the statistic - */ - public String StatisticName; - - } - - public static class GetPlayerStatisticVersionsResult { - /** - * version change history of the statistic - */ - public ArrayList StatisticVersions; - - } - public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2392,34 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PlayerStatisticVersion { - /** - * name of the statistic when the version became active - */ - public String StatisticName; - /** - * version of the statistic - */ - public Long Version; - /** - * time at which the statistic version was scheduled to become active, based on the configured ResetInterval - */ - public Date ScheduledActivationTime; - /** - * time when the statistic version became active - */ - public Date ActivationTime; - /** - * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval - */ - public Date ScheduledDeactivationTime; - /** - * time when the statistic version became inactive due to statistic version incrementing - */ - public Date DeactivationTime; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2838,18 +2790,6 @@ public static class StartPurchaseResult { } - public static class StatisticNameVersion { - /** - * unique name of the statistic - */ - public String StatisticName; - /** - * the version of the statistic to be returned - */ - public Long Version; - - } - public static class StatisticUpdate { /** * unique name of the statistic @@ -2878,7 +2818,7 @@ public static class StatisticValue { /** * for updates to an existing statistic value for a player, the version of the statistic when it was loaded */ - public String Version; + public Long Version; } diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index c4c187a9..30a5fbe5 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,64 +2658,6 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); - GetPlayerStatisticVersionsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 615634d9..be8ed361 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,13 +1221,9 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return (current version will be returned for each) + * statistics to return */ public ArrayList StatisticNames; - /** - * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) - */ - public ArrayList StatisticNameVersions; } @@ -1239,22 +1235,6 @@ public static class GetPlayerStatisticsResult { } - public static class GetPlayerStatisticVersionsRequest { - /** - * unique name of the statistic - */ - public String StatisticName; - - } - - public static class GetPlayerStatisticVersionsResult { - /** - * version change history of the statistic - */ - public ArrayList StatisticVersions; - - } - public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2392,34 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PlayerStatisticVersion { - /** - * name of the statistic when the version became active - */ - public String StatisticName; - /** - * version of the statistic - */ - public Long Version; - /** - * time at which the statistic version was scheduled to become active, based on the configured ResetInterval - */ - public Date ScheduledActivationTime; - /** - * time when the statistic version became active - */ - public Date ActivationTime; - /** - * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval - */ - public Date ScheduledDeactivationTime; - /** - * time when the statistic version became inactive due to statistic version incrementing - */ - public Date DeactivationTime; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2838,18 +2790,6 @@ public static class StartPurchaseResult { } - public static class StatisticNameVersion { - /** - * unique name of the statistic - */ - public String StatisticName; - /** - * the version of the statistic to be returned - */ - public Long Version; - - } - public static class StatisticUpdate { /** * unique name of the statistic @@ -2878,7 +2818,7 @@ public static class StatisticValue { /** * for updates to an existing statistic value for a player, the version of the statistic when it was loaded */ - public String Version; + public Long Version; } diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index c4c187a9..30a5fbe5 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. + * Retrieves the current version and values for the indicated statistics, for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,64 +2658,6 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { - if (_authKey == null) throw new Exception ("Must be logged in to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); - GetPlayerStatisticVersionsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 615634d9..be8ed361 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,13 +1221,9 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return (current version will be returned for each) + * statistics to return */ public ArrayList StatisticNames; - /** - * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) - */ - public ArrayList StatisticNameVersions; } @@ -1239,22 +1235,6 @@ public static class GetPlayerStatisticsResult { } - public static class GetPlayerStatisticVersionsRequest { - /** - * unique name of the statistic - */ - public String StatisticName; - - } - - public static class GetPlayerStatisticVersionsResult { - /** - * version change history of the statistic - */ - public ArrayList StatisticVersions; - - } - public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2392,34 +2372,6 @@ public static class PlayerLeaderboardEntry { } - public static class PlayerStatisticVersion { - /** - * name of the statistic when the version became active - */ - public String StatisticName; - /** - * version of the statistic - */ - public Long Version; - /** - * time at which the statistic version was scheduled to become active, based on the configured ResetInterval - */ - public Date ScheduledActivationTime; - /** - * time when the statistic version became active - */ - public Date ActivationTime; - /** - * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval - */ - public Date ScheduledDeactivationTime; - /** - * time when the statistic version became inactive due to statistic version incrementing - */ - public Date DeactivationTime; - - } - public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2838,18 +2790,6 @@ public static class StartPurchaseResult { } - public static class StatisticNameVersion { - /** - * unique name of the statistic - */ - public String StatisticName; - /** - * the version of the statistic to be returned - */ - public Long Version; - - } - public static class StatisticUpdate { /** * unique name of the statistic @@ -2878,7 +2818,7 @@ public static class StatisticValue { /** * for updates to an existing statistic value for a player, the version of the statistic when it was loaded */ - public String Version; + public Long Version; } diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index 1d0f58b9..ec70233c 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,64 +538,6 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - task.run(); - Object httpResult = task.get(); - if(httpResult instanceof PlayFabError) { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler.callback(error); - PlayFabResult result = new PlayFabResult(); - result.Error = error; - return result; - } - String resultRawJson = (String) httpResult; - - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - GetPlayerStatisticVersionsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 5dfb4afa..4673e636 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -912,10 +912,6 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; - /** - * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) - */ - public ArrayList StatisticNameVersions; } @@ -931,22 +927,6 @@ public static class GetPlayerStatisticsResult { } - public static class GetPlayerStatisticVersionsRequest { - /** - * unique name of the statistic - */ - public String StatisticName; - - } - - public static class GetPlayerStatisticVersionsResult { - /** - * version change history of the statistic - */ - public ArrayList StatisticVersions; - - } - public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1661,34 +1641,6 @@ public static class PlayerLeaderboardEntry { } - public static class PlayerStatisticVersion { - /** - * name of the statistic when the version became active - */ - public String StatisticName; - /** - * version of the statistic - */ - public Long Version; - /** - * time at which the statistic version was scheduled to become active, based on the configured ResetInterval - */ - public Date ScheduledActivationTime; - /** - * time when the statistic version became active - */ - public Date ActivationTime; - /** - * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval - */ - public Date ScheduledDeactivationTime; - /** - * time when the statistic version became inactive due to statistic version incrementing - */ - public Date DeactivationTime; - - } - public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1913,18 +1865,6 @@ public static class SharedGroupDataRecord { } - public static class StatisticNameVersion { - /** - * unique name of the statistic - */ - public String StatisticName; - /** - * the version of the statistic to be returned - */ - public Long Version; - - } - public static class StatisticUpdate { /** * unique name of the statistic @@ -1953,7 +1893,7 @@ public static class StatisticValue { /** * for updates to an existing statistic value for a player, the version of the statistic when it was loaded */ - public String Version; + public Long Version; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index 1d0f58b9..ec70233c 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,64 +538,6 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { - return new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { - FutureTask> task = new FutureTask(new Callable>() { - public PlayFabResult call() throws Exception { - return privateGetPlayerStatisticVersionsAsync(request); - } - }); - try { - task.run(); - return task.get(); - } catch(Exception e) { - return null; - } - } - - /** - * Retrieves the information on the available versions of the specified statistic. - */ - @SuppressWarnings("unchecked") - private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { - if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); - - FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); - task.run(); - Object httpResult = task.get(); - if(httpResult instanceof PlayFabError) { - PlayFabError error = (PlayFabError)httpResult; - if (PlayFabSettings.GlobalErrorHandler != null) - PlayFabSettings.GlobalErrorHandler.callback(error); - PlayFabResult result = new PlayFabResult(); - result.Error = error; - return result; - } - String resultRawJson = (String) httpResult; - - PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); - GetPlayerStatisticVersionsResult result = resultData.data; - - PlayFabResult pfResult = new PlayFabResult(); - pfResult.Result = result; - return pfResult; - } - /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 5dfb4afa..4673e636 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -912,10 +912,6 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; - /** - * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) - */ - public ArrayList StatisticNameVersions; } @@ -931,22 +927,6 @@ public static class GetPlayerStatisticsResult { } - public static class GetPlayerStatisticVersionsRequest { - /** - * unique name of the statistic - */ - public String StatisticName; - - } - - public static class GetPlayerStatisticVersionsResult { - /** - * version change history of the statistic - */ - public ArrayList StatisticVersions; - - } - public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1661,34 +1641,6 @@ public static class PlayerLeaderboardEntry { } - public static class PlayerStatisticVersion { - /** - * name of the statistic when the version became active - */ - public String StatisticName; - /** - * version of the statistic - */ - public Long Version; - /** - * time at which the statistic version was scheduled to become active, based on the configured ResetInterval - */ - public Date ScheduledActivationTime; - /** - * time when the statistic version became active - */ - public Date ActivationTime; - /** - * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval - */ - public Date ScheduledDeactivationTime; - /** - * time when the statistic version became inactive due to statistic version incrementing - */ - public Date DeactivationTime; - - } - public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1913,18 +1865,6 @@ public static class SharedGroupDataRecord { } - public static class StatisticNameVersion { - /** - * unique name of the statistic - */ - public String StatisticName; - /** - * the version of the statistic to be returned - */ - public Long Version; - - } - public static class StatisticUpdate { /** * unique name of the statistic @@ -1953,7 +1893,7 @@ public static class StatisticValue { /** * for updates to an existing statistic value for a player, the version of the statistic when it was loaded */ - public String Version; + public Long Version; } From 9bd4d59d132a2aa238fcc12a633335e9a5afd8a5 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Wed, 2 Mar 2016 02:59:17 +0000 Subject: [PATCH 6/8] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../java/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../src/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabClientAPI.java | 64 ++++++++++++++++++- .../src/com/playfab/PlayFabClientModels.java | 62 +++++++++++++++++- .../src/com/playfab/PlayFabServerAPI.java | 58 +++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 60 +++++++++++++++++ .../src/com/playfab/PlayFabServerAPI.java | 58 +++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 60 +++++++++++++++++ 10 files changed, 602 insertions(+), 12 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 5d0a0654..641450f1 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -2602,7 +2602,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2614,7 +2614,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2632,7 +2632,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2659,6 +2659,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index be8ed361..34c7cae7 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index 30a5fbe5..c4c187a9 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,6 +2658,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index be8ed361..34c7cae7 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index 30a5fbe5..c4c187a9 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -2601,7 +2601,7 @@ private static PlayFabResult privateGetLeaderb } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) { @@ -2613,7 +2613,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) { @@ -2631,7 +2631,7 @@ public PlayFabResult call() throws Exception { } /** - * Retrieves the current version and values for the indicated statistics, for the local player. + * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player. */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception { @@ -2658,6 +2658,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerStatisticVersions", 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()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index be8ed361..34c7cae7 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -1221,9 +1221,13 @@ public static class GetPhotonAuthenticationTokenResult { public static class GetPlayerStatisticsRequest { /** - * statistics to return + * statistics to return (current version will be returned for each) */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -1235,6 +1239,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayerTradesRequest { /** * Returns only trades with the given status. If null, returns all trades. @@ -2372,6 +2392,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class PurchaseItemRequest { /** * Unique identifier of the item to purchase. @@ -2790,6 +2838,18 @@ public static class StartPurchaseResult { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..1d0f58b9 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,6 +538,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index 4673e636..347a1e2b 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -912,6 +912,10 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -927,6 +931,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1641,6 +1661,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1865,6 +1913,18 @@ public static class SharedGroupDataRecord { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index ec70233c..1d0f58b9 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -538,6 +538,64 @@ private static PlayFabResult privateGetPlayerStatisti return pfResult; } + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPlayerStatisticVersionsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Retrieves the information on the available versions of the specified statistic. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + task.run(); + Object httpResult = task.get(); + if(httpResult instanceof PlayFabError) { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler.callback(error); + PlayFabResult result = new PlayFabResult(); + result.Error = error; + return result; + } + String resultRawJson = (String) httpResult; + + PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType()); + GetPlayerStatisticVersionsResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Retrieves the title-specific custom data for the user which is readable and writable by the client */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index 4673e636..347a1e2b 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -912,6 +912,10 @@ public static class GetPlayerStatisticsRequest { * statistics to return */ public ArrayList StatisticNames; + /** + * statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned) + */ + public ArrayList StatisticNameVersions; } @@ -927,6 +931,22 @@ public static class GetPlayerStatisticsResult { } + public static class GetPlayerStatisticVersionsRequest { + /** + * unique name of the statistic + */ + public String StatisticName; + + } + + public static class GetPlayerStatisticVersionsResult { + /** + * version change history of the statistic + */ + public ArrayList StatisticVersions; + + } + public static class GetPlayFabIDsFromFacebookIDsRequest { /** * Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. @@ -1641,6 +1661,34 @@ public static class PlayerLeaderboardEntry { } + public static class PlayerStatisticVersion { + /** + * name of the statistic when the version became active + */ + public String StatisticName; + /** + * version of the statistic + */ + public Long Version; + /** + * time at which the statistic version was scheduled to become active, based on the configured ResetInterval + */ + public Date ScheduledActivationTime; + /** + * time when the statistic version became active + */ + public Date ActivationTime; + /** + * time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + */ + public Date ScheduledDeactivationTime; + /** + * time when the statistic version became inactive due to statistic version incrementing + */ + public Date DeactivationTime; + + } + public static class RedeemCouponRequest { /** * Generated coupon code to redeem. @@ -1865,6 +1913,18 @@ public static class SharedGroupDataRecord { } + public static class StatisticNameVersion { + /** + * unique name of the statistic + */ + public String StatisticName; + /** + * the version of the statistic to be returned + */ + public Long Version; + + } + public static class StatisticUpdate { /** * unique name of the statistic From 7d10a444638974f62741369ee2ef88bf96f1fb19 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Sat, 5 Mar 2016 05:19:37 +0000 Subject: [PATCH 7/8] Automated build from Jenkins --- .../app/src/main/java/com/playfab/PlayFabErrors.java | 3 ++- PlayFabClientSDK/src/com/playfab/PlayFabErrors.java | 3 ++- PlayFabSDK/src/com/playfab/PlayFabErrors.java | 3 ++- PlayFabServerSDK/src/com/playfab/PlayFabErrors.java | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java index 428536c1..54b701d0 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java @@ -206,7 +206,8 @@ public static enum PlayFabErrorCode { StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), StatisticVersionIncrementRateExceeded(1204), - ContainerKeyInvalid(1205); + ContainerKeyInvalid(1205), + CloudScriptExecutionTimeLimitExceeded(1206); public int id; diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java index 428536c1..54b701d0 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java @@ -206,7 +206,8 @@ public static enum PlayFabErrorCode { StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), StatisticVersionIncrementRateExceeded(1204), - ContainerKeyInvalid(1205); + ContainerKeyInvalid(1205), + CloudScriptExecutionTimeLimitExceeded(1206); public int id; diff --git a/PlayFabSDK/src/com/playfab/PlayFabErrors.java b/PlayFabSDK/src/com/playfab/PlayFabErrors.java index 428536c1..54b701d0 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabSDK/src/com/playfab/PlayFabErrors.java @@ -206,7 +206,8 @@ public static enum PlayFabErrorCode { StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), StatisticVersionIncrementRateExceeded(1204), - ContainerKeyInvalid(1205); + ContainerKeyInvalid(1205), + CloudScriptExecutionTimeLimitExceeded(1206); public int id; diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java index 428536c1..54b701d0 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java @@ -206,7 +206,8 @@ public static enum PlayFabErrorCode { StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), StatisticVersionIncrementRateExceeded(1204), - ContainerKeyInvalid(1205); + ContainerKeyInvalid(1205), + CloudScriptExecutionTimeLimitExceeded(1206); public int id; From 9ee40488fe9f382cc8b1d21006e97787938cd4f4 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 7 Mar 2016 22:28:58 +0000 Subject: [PATCH 8/8] Automated build from Jenkins --- .../app/src/main/java/com/playfab/internal/PlayFabVersion.java | 2 +- PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java | 2 +- PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java | 2 +- PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 955bd363..917dc076 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.18.160222"; + public static String SdkRevision = "0.19.160307"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabClientSDK/src/com/playfab/internal/PlayFabVersion.java index 955bd363..917dc076 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.18.160222"; + public static String SdkRevision = "0.19.160307"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabSDK/src/com/playfab/internal/PlayFabVersion.java index 955bd363..917dc076 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.18.160222"; + public static String SdkRevision = "0.19.160307"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } diff --git a/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java b/PlayFabServerSDK/src/com/playfab/internal/PlayFabVersion.java index 955bd363..917dc076 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.18.160222"; + public static String SdkRevision = "0.19.160307"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; }