From b5a2afd569cc0538f11591e6ae6165a6a3ac99aa Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 5 Feb 2016 01:26:25 +0000 Subject: [PATCH 1/5] Automated build from Jenkins --- .../src/com/playfab/PlayFabAdminModels.java | 25 +++++++++---------- .../src/com/playfab/PlayFabAdminModels.java | 25 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java index 58dbf46e3..258bfe129 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabAdminModels.java @@ -316,11 +316,11 @@ public static class CreatePlayerStatisticDefinitionRequest { /** * unique name of the statistic */ - public String Name; + public String StatisticName; /** * interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } @@ -1103,15 +1103,6 @@ public static class IncrementPlayerStatisticVersionResult { } - public static enum Interval { - FiveMinutes, - FifteenMinutes, - Hour, - Day, - Week, - Month - } - public static class ItemGrant { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -1386,7 +1377,7 @@ public static class PlayerStatisticDefinition { /** * interval at which the values of the statistic for all players are reset */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } @@ -1703,6 +1694,14 @@ public static class SetupPushNotificationResult { } + public static enum StatisticResetIntervalOption { + Never, + Hour, + Day, + Week, + Month + } + public static enum StatisticVersionArchivalStatus { NotScheduled, Scheduled, @@ -1807,7 +1806,7 @@ public static class UpdatePlayerStatisticDefinitionRequest { /** * interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java index 58dbf46e3..258bfe129 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java @@ -316,11 +316,11 @@ public static class CreatePlayerStatisticDefinitionRequest { /** * unique name of the statistic */ - public String Name; + public String StatisticName; /** * interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } @@ -1103,15 +1103,6 @@ public static class IncrementPlayerStatisticVersionResult { } - public static enum Interval { - FiveMinutes, - FifteenMinutes, - Hour, - Day, - Week, - Month - } - public static class ItemGrant { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. @@ -1386,7 +1377,7 @@ public static class PlayerStatisticDefinition { /** * interval at which the values of the statistic for all players are reset */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } @@ -1703,6 +1694,14 @@ public static class SetupPushNotificationResult { } + public static enum StatisticResetIntervalOption { + Never, + Hour, + Day, + Week, + Month + } + public static enum StatisticVersionArchivalStatus { NotScheduled, Scheduled, @@ -1807,7 +1806,7 @@ public static class UpdatePlayerStatisticDefinitionRequest { /** * interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary */ - public Interval VersionChangeInterval; + public StatisticResetIntervalOption VersionChangeInterval; } From 26bd5b173e73cb32754a73a6912674b2b00a2031 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Sun, 7 Feb 2016 07:46:24 +0000 Subject: [PATCH 2/5] Automated build from Jenkins --- .../app/src/main/java/com/playfab/PlayFabClientAPI.java | 6 +++--- PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java | 6 +++--- PlayFabSDK/src/com/playfab/PlayFabClientAPI.java | 6 +++--- PlayFabSDK/src/com/playfab/PlayFabServerAPI.java | 6 +++--- PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 45dc59d8f..9a263163b 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -5857,7 +5857,7 @@ private static PlayFabResult privateRunCloudScriptAsync(fi } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) { @@ -5869,7 +5869,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) { @@ -5887,7 +5887,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception { diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index 170aa1663..b79150718 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -5856,7 +5856,7 @@ private static PlayFabResult privateRunCloudScriptAsync(fi } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) { @@ -5868,7 +5868,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) { @@ -5886,7 +5886,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception { diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index 170aa1663..b79150718 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -5856,7 +5856,7 @@ private static PlayFabResult privateRunCloudScriptAsync(fi } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) { @@ -5868,7 +5868,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) { @@ -5886,7 +5886,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception { diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index 186f5bef2..a3cba96da 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -3323,7 +3323,7 @@ private static PlayFabResult privateUpdateSharedGro } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) { @@ -3335,7 +3335,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) { @@ -3353,7 +3353,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception { diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index 186f5bef2..a3cba96da 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -3323,7 +3323,7 @@ private static PlayFabResult privateUpdateSharedGro } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) { @@ -3335,7 +3335,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) { @@ -3353,7 +3353,7 @@ public PlayFabResult call() throws Exception { } /** - * 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://support.playfab.com/support/discussions/topics/1000059929 + * 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 */ @SuppressWarnings("unchecked") private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception { From fc1bfd531e55f8453b15b8714c7f8ebcea2340c0 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 18:55:00 +0000 Subject: [PATCH 3/5] 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 95e40551c..6d0c98fe3 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.15.160201"; + public static String SdkRevision = "0.15.160208"; 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 95e40551c..6d0c98fe3 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.15.160201"; + public static String SdkRevision = "0.15.160208"; 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 95e40551c..6d0c98fe3 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.15.160201"; + public static String SdkRevision = "0.15.160208"; 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 95e40551c..6d0c98fe3 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.15.160201"; + public static String SdkRevision = "0.15.160208"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; } From 13eb9745832e9c1e11c2ef697cb7cac7bc9c7800 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 19:11:59 +0000 Subject: [PATCH 4/5] Automated build from Jenkins --- .../java/com/playfab/PlayFabClientAPI.java | 64 +++++++++- .../java/com/playfab/PlayFabClientModels.java | 24 +++- .../main/java/com/playfab/PlayFabErrors.java | 3 +- .../src/com/playfab/PlayFabClientAPI.java | 64 +++++++++- .../src/com/playfab/PlayFabClientModels.java | 24 +++- .../src/com/playfab/PlayFabErrors.java | 3 +- .../src/com/playfab/PlayFabClientAPI.java | 64 +++++++++- .../src/com/playfab/PlayFabClientModels.java | 24 +++- PlayFabSDK/src/com/playfab/PlayFabErrors.java | 3 +- .../src/com/playfab/PlayFabServerAPI.java | 116 ++++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 64 ++++++++++ .../src/com/playfab/PlayFabErrors.java | 3 +- .../src/com/playfab/PlayFabServerAPI.java | 116 ++++++++++++++++++ .../src/com/playfab/PlayFabServerModels.java | 64 ++++++++++ 14 files changed, 617 insertions(+), 19 deletions(-) diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java index 9a263163b..4ade7593a 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientAPI.java @@ -4406,7 +4406,65 @@ private static PlayFabResult privateSubtractUse } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlockContainerInstance", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) { @@ -4418,7 +4476,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) { @@ -4436,7 +4494,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest request) throws Exception { diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index 0d353dbc5..cb925cb7a 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -3220,13 +3220,33 @@ public static class UnlinkXboxAccountResult { } + public static class UnlockContainerInstanceRequest { + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * ItemInstanceId of the container to unlock. + */ + public String ContainerItemInstanceId; + /** + * ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + public String KeyItemInstanceId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + */ + public String CatalogVersion; + + } + public static class UnlockContainerItemRequest { /** - * Category ItemId of the container type to unlock. + * Catalog ItemId of the container type to unlock. */ public String ContainerItemId; /** - * Catalog version of the container. + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. */ public String CatalogVersion; /** diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java index cf8d54712..428536c1a 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java @@ -205,7 +205,8 @@ public static enum PlayFabErrorCode { InvalidDropTable(1201), StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), - StatisticVersionIncrementRateExceeded(1204); + StatisticVersionIncrementRateExceeded(1204), + ContainerKeyInvalid(1205); public int id; diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java index b79150718..4d81f5468 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientAPI.java @@ -4405,7 +4405,65 @@ private static PlayFabResult privateSubtractUse } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlockContainerInstance", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) { @@ -4417,7 +4475,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) { @@ -4435,7 +4493,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest request) throws Exception { diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java index 0d353dbc5..cb925cb7a 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabClientModels.java @@ -3220,13 +3220,33 @@ public static class UnlinkXboxAccountResult { } + public static class UnlockContainerInstanceRequest { + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * ItemInstanceId of the container to unlock. + */ + public String ContainerItemInstanceId; + /** + * ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + public String KeyItemInstanceId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + */ + public String CatalogVersion; + + } + public static class UnlockContainerItemRequest { /** - * Category ItemId of the container type to unlock. + * Catalog ItemId of the container type to unlock. */ public String ContainerItemId; /** - * Catalog version of the container. + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. */ public String CatalogVersion; /** diff --git a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java index cf8d54712..428536c1a 100644 --- a/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabClientSDK/src/com/playfab/PlayFabErrors.java @@ -205,7 +205,8 @@ public static enum PlayFabErrorCode { InvalidDropTable(1201), StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), - StatisticVersionIncrementRateExceeded(1204); + StatisticVersionIncrementRateExceeded(1204), + ContainerKeyInvalid(1205); public int id; diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java index b79150718..4d81f5468 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientAPI.java @@ -4405,7 +4405,65 @@ private static PlayFabResult privateSubtractUse } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) throws Exception { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/UnlockContainerInstance", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) { @@ -4417,7 +4475,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) { @@ -4435,7 +4493,7 @@ public PlayFabResult call() throws Exception { } /** - * Unlocks a container item in the user's inventory and consumes a key item of the type indicated by the container item + * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. */ @SuppressWarnings("unchecked") private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest request) throws Exception { diff --git a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java index 0d353dbc5..cb925cb7a 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabClientModels.java @@ -3220,13 +3220,33 @@ public static class UnlinkXboxAccountResult { } + public static class UnlockContainerInstanceRequest { + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * ItemInstanceId of the container to unlock. + */ + public String ContainerItemInstanceId; + /** + * ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + public String KeyItemInstanceId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + */ + public String CatalogVersion; + + } + public static class UnlockContainerItemRequest { /** - * Category ItemId of the container type to unlock. + * Catalog ItemId of the container type to unlock. */ public String ContainerItemId; /** - * Catalog version of the container. + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. */ public String CatalogVersion; /** diff --git a/PlayFabSDK/src/com/playfab/PlayFabErrors.java b/PlayFabSDK/src/com/playfab/PlayFabErrors.java index cf8d54712..428536c1a 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabSDK/src/com/playfab/PlayFabErrors.java @@ -205,7 +205,8 @@ public static enum PlayFabErrorCode { InvalidDropTable(1201), StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), - StatisticVersionIncrementRateExceeded(1204); + StatisticVersionIncrementRateExceeded(1204), + ContainerKeyInvalid(1205); public int id; diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java index a3cba96da..25440f561 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerAPI.java @@ -2568,6 +2568,122 @@ private static PlayFabResult privateSubtractUse return pfResult; } + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + } + + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest 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/UnlockContainerInstance", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerItemAsync(request); + } + }); + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerItemAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest 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/UnlockContainerItem", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the key-value pair data tagged to the specified item, which is read-only from the client. */ diff --git a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java index ef0ebccf9..84341d8f5 100644 --- a/PlayFabSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/com/playfab/PlayFabServerModels.java @@ -1977,6 +1977,70 @@ public static class TitleNewsItem { } + public static class UnlockContainerInstanceRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * ItemInstanceId of the container to unlock. + */ + public String ContainerItemInstanceId; + /** + * ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + public String KeyItemInstanceId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + */ + public String CatalogVersion; + + } + + public static class UnlockContainerItemRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * Catalog ItemId of the container type to unlock. + */ + public String ContainerItemId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. + */ + public String CatalogVersion; + + } + + public static class UnlockContainerItemResult { + /** + * Unique instance identifier of the container unlocked. + */ + public String UnlockedItemInstanceId; + /** + * Unique instance identifier of the key used to unlock the container, if applicable. + */ + public String UnlockedWithItemInstanceId; + /** + * Items granted to the player as a result of unlocking the container. + */ + public ArrayList GrantedItems; + /** + * Virtual currency granted to the player as a result of unlocking the container. + */ + public Map VirtualCurrency; + + } + public static class UpdateCharacterDataRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java index cf8d54712..428536c1a 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabErrors.java @@ -205,7 +205,8 @@ public static enum PlayFabErrorCode { InvalidDropTable(1201), StatisticVersionAlreadyIncrementedForScheduledInterval(1202), StatisticCountLimitExceeded(1203), - StatisticVersionIncrementRateExceeded(1204); + StatisticVersionIncrementRateExceeded(1204), + ContainerKeyInvalid(1205); public int id; diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java index a3cba96da..25440f561 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerAPI.java @@ -2568,6 +2568,122 @@ private static PlayFabResult privateSubtractUse return pfResult; } + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + } + + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerInstanceAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest 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/UnlockContainerInstance", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerItemAsync(request); + } + }); + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateUnlockContainerItemAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** + * Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest 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/UnlockContainerItem", 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()); + UnlockContainerItemResult result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Updates the key-value pair data tagged to the specified item, which is read-only from the client. */ diff --git a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java index ef0ebccf9..84341d8f5 100644 --- a/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/com/playfab/PlayFabServerModels.java @@ -1977,6 +1977,70 @@ public static class TitleNewsItem { } + public static class UnlockContainerInstanceRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * ItemInstanceId of the container to unlock. + */ + public String ContainerItemInstanceId; + /** + * ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + public String KeyItemInstanceId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + */ + public String CatalogVersion; + + } + + public static class UnlockContainerItemRequest { + /** + * Unique PlayFab assigned ID of the user on whom the operation will be performed. + */ + public String PlayFabId; + /** + * Unique PlayFab assigned ID for a specific character owned by a user + */ + public String CharacterId; + /** + * Catalog ItemId of the container type to unlock. + */ + public String ContainerItemId; + /** + * Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. + */ + public String CatalogVersion; + + } + + public static class UnlockContainerItemResult { + /** + * Unique instance identifier of the container unlocked. + */ + public String UnlockedItemInstanceId; + /** + * Unique instance identifier of the key used to unlock the container, if applicable. + */ + public String UnlockedWithItemInstanceId; + /** + * Items granted to the player as a result of unlocking the container. + */ + public ArrayList GrantedItems; + /** + * Virtual currency granted to the player as a result of unlocking the container. + */ + public Map VirtualCurrency; + + } + public static class UpdateCharacterDataRequest { /** * Unique PlayFab assigned ID of the user on whom the operation will be performed. From df064ee55c0c6e4575d7f3b97e480e6c9bf899e3 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 19:54:43 +0000 Subject: [PATCH 5/5] 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 6d0c98fe3..09c3f9c00 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.15.160208"; + public static String SdkRevision = "0.16.160208"; 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 6d0c98fe3..09c3f9c00 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.15.160208"; + public static String SdkRevision = "0.16.160208"; 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 6d0c98fe3..09c3f9c00 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.15.160208"; + public static String SdkRevision = "0.16.160208"; 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 6d0c98fe3..09c3f9c00 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.15.160208"; + public static String SdkRevision = "0.16.160208"; public static String getVersionString() { return "JavaSDK-" + SdkRevision; }