From 5e1cc2992babae3ce101af367019f710e618307c Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Tue, 2 Feb 2016 23:49:11 +0000 Subject: [PATCH 1/6] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientModels.cs | 4 ++-- PlayFabSDK/source/PlayFabClientModels.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index babc00b8..2d474864 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -2024,7 +2024,7 @@ public class GetPlayFabIDsFromSteamIDsRequest /// /// Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. /// - public List SteamIDs { get; set;} + public List SteamIDs { get; set;} } @@ -4462,7 +4462,7 @@ public class SteamPlayFabIdPair /// /// Unique Steam identifier for a user. /// - public uint SteamId { get; set;} + public ulong SteamId { get; set;} /// /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index babc00b8..2d474864 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -2024,7 +2024,7 @@ public class GetPlayFabIDsFromSteamIDsRequest /// /// Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. /// - public List SteamIDs { get; set;} + public List SteamIDs { get; set;} } @@ -4462,7 +4462,7 @@ public class SteamPlayFabIdPair /// /// Unique Steam identifier for a user. /// - public uint SteamId { get; set;} + public ulong SteamId { get; set;} /// /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. From 3ce0ce71986b5841d28fd6e18af2535bd7989d8c Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 5 Feb 2016 01:26:03 +0000 Subject: [PATCH 2/6] Automated build from Jenkins --- PlayFabSDK/source/PlayFabAdminModels.cs | 31 +++++++++---------- PlayFabServerSDK/source/PlayFabAdminModels.cs | 31 +++++++++---------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/PlayFabSDK/source/PlayFabAdminModels.cs b/PlayFabSDK/source/PlayFabAdminModels.cs index 1df3c7a4..4009acf0 100644 --- a/PlayFabSDK/source/PlayFabAdminModels.cs +++ b/PlayFabSDK/source/PlayFabAdminModels.cs @@ -457,13 +457,13 @@ public class CreatePlayerStatisticDefinitionRequest /// /// unique name of the statistic /// - public string Name { get; set;} + public string StatisticName { get; set;} /// /// interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } @@ -1592,18 +1592,6 @@ public class IncrementPlayerStatisticVersionResult - public enum Interval - { - FiveMinutes, - FifteenMinutes, - Hour, - Day, - Week, - Month - } - - - public class ItemGrant { @@ -2004,7 +1992,7 @@ public class PlayerStatisticDefinition /// interval at which the values of the statistic for all players are reset /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } @@ -2517,6 +2505,17 @@ public class SetupPushNotificationResult + public enum StatisticResetIntervalOption + { + Never, + Hour, + Day, + Week, + Month + } + + + public enum StatisticVersionArchivalStatus { NotScheduled, @@ -2676,7 +2675,7 @@ public class UpdatePlayerStatisticDefinitionRequest /// interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } diff --git a/PlayFabServerSDK/source/PlayFabAdminModels.cs b/PlayFabServerSDK/source/PlayFabAdminModels.cs index 1df3c7a4..4009acf0 100644 --- a/PlayFabServerSDK/source/PlayFabAdminModels.cs +++ b/PlayFabServerSDK/source/PlayFabAdminModels.cs @@ -457,13 +457,13 @@ public class CreatePlayerStatisticDefinitionRequest /// /// unique name of the statistic /// - public string Name { get; set;} + public string StatisticName { get; set;} /// /// interval at which the values of the statistic for all players are reset. Resets begin at the next interval boundary /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } @@ -1592,18 +1592,6 @@ public class IncrementPlayerStatisticVersionResult - public enum Interval - { - FiveMinutes, - FifteenMinutes, - Hour, - Day, - Week, - Month - } - - - public class ItemGrant { @@ -2004,7 +1992,7 @@ public class PlayerStatisticDefinition /// interval at which the values of the statistic for all players are reset /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } @@ -2517,6 +2505,17 @@ public class SetupPushNotificationResult + public enum StatisticResetIntervalOption + { + Never, + Hour, + Day, + Week, + Month + } + + + public enum StatisticVersionArchivalStatus { NotScheduled, @@ -2676,7 +2675,7 @@ public class UpdatePlayerStatisticDefinitionRequest /// interval at which the values of the statistic for all players are reset. Changes are effective at the next interval boundary /// [JsonConverter(typeof(StringEnumConverter))] - public Interval? VersionChangeInterval { get; set;} + public StatisticResetIntervalOption? VersionChangeInterval { get; set;} } From 561a83767683661755c117b817b3db519886afd4 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Sun, 7 Feb 2016 07:45:58 +0000 Subject: [PATCH 3/6] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 2 +- PlayFabSDK/source/PlayFabClientAPI.cs | 2 +- PlayFabSDK/source/PlayFabServerAPI.cs | 2 +- PlayFabServerSDK/source/PlayFabServerAPI.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index 289c9d3c..fcbc3a5e 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -2553,7 +2553,7 @@ public static async Task> RunCloudScriptAsyn } /// - /// 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 /// public static async Task> GetContentDownloadUrlAsync(GetContentDownloadUrlRequest request) { diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index 289c9d3c..fcbc3a5e 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -2553,7 +2553,7 @@ public static async Task> RunCloudScriptAsyn } /// - /// 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 /// public static async Task> GetContentDownloadUrlAsync(GetContentDownloadUrlRequest request) { diff --git a/PlayFabSDK/source/PlayFabServerAPI.cs b/PlayFabSDK/source/PlayFabServerAPI.cs index 61c1e87a..e91b0253 100644 --- a/PlayFabSDK/source/PlayFabServerAPI.cs +++ b/PlayFabSDK/source/PlayFabServerAPI.cs @@ -1439,7 +1439,7 @@ public static async Task> UpdateShare } /// - /// 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 /// public static async Task> GetContentDownloadUrlAsync(GetContentDownloadUrlRequest request) { diff --git a/PlayFabServerSDK/source/PlayFabServerAPI.cs b/PlayFabServerSDK/source/PlayFabServerAPI.cs index 61c1e87a..e91b0253 100644 --- a/PlayFabServerSDK/source/PlayFabServerAPI.cs +++ b/PlayFabServerSDK/source/PlayFabServerAPI.cs @@ -1439,7 +1439,7 @@ public static async Task> UpdateShare } /// - /// 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 /// public static async Task> GetContentDownloadUrlAsync(GetContentDownloadUrlRequest request) { From 4ce04196f461cb2732fe0ce9b35fff67af22348c Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 18:54:37 +0000 Subject: [PATCH 4/6] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabVersion.cs | 2 +- PlayFabSDK/source/PlayFabVersion.cs | 2 +- PlayFabServerSDK/source/PlayFabVersion.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabVersion.cs b/PlayFabClientSDK/source/PlayFabVersion.cs index 39314ec7..74dd8801 100644 --- a/PlayFabClientSDK/source/PlayFabVersion.cs +++ b/PlayFabClientSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160201"; + public static string SdkRevision = "0.16.160208"; public static string getVersionString() { diff --git a/PlayFabSDK/source/PlayFabVersion.cs b/PlayFabSDK/source/PlayFabVersion.cs index 39314ec7..74dd8801 100644 --- a/PlayFabSDK/source/PlayFabVersion.cs +++ b/PlayFabSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160201"; + public static string SdkRevision = "0.16.160208"; public static string getVersionString() { diff --git a/PlayFabServerSDK/source/PlayFabVersion.cs b/PlayFabServerSDK/source/PlayFabVersion.cs index 39314ec7..74dd8801 100644 --- a/PlayFabServerSDK/source/PlayFabVersion.cs +++ b/PlayFabServerSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160201"; + public static string SdkRevision = "0.16.160208"; public static string getVersionString() { From c56e436df16a1732e50d51fc02b585a4fb7e0b92 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 19:11:35 +0000 Subject: [PATCH 5/6] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabClientAPI.cs | 27 +++++- .../source/PlayFabClientModels.cs | 33 ++++++- PlayFabClientSDK/source/PlayFabErrors.cs | 3 +- PlayFabSDK/source/PlayFabClientAPI.cs | 27 +++++- PlayFabSDK/source/PlayFabClientModels.cs | 33 ++++++- PlayFabSDK/source/PlayFabErrors.cs | 3 +- PlayFabSDK/source/PlayFabServerAPI.cs | 50 ++++++++++ PlayFabSDK/source/PlayFabServerModels.cs | 92 +++++++++++++++++++ PlayFabServerSDK/source/PlayFabErrors.cs | 3 +- PlayFabServerSDK/source/PlayFabServerAPI.cs | 50 ++++++++++ .../source/PlayFabServerModels.cs | 92 +++++++++++++++++++ 11 files changed, 404 insertions(+), 9 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index fcbc3a5e..025095d9 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -1927,7 +1927,32 @@ public static async Task> Subtrac } /// - /// 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. + /// + public static async Task> UnlockContainerInstanceAsync(UnlockContainerInstanceRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UnlockContainerInstance", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// 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. /// public static async Task> UnlockContainerItemAsync(UnlockContainerItemRequest request) { diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index 2d474864..1d4f0034 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -4881,17 +4881,46 @@ public class UnlinkXboxAccountResult + public class UnlockContainerInstanceRequest + { + + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId { get; set;} + + /// + /// 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 { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + /// + public string CatalogVersion { get; set;} + + + } + + + public class UnlockContainerItemRequest { /// - /// Category ItemId of the container type to unlock. + /// Catalog ItemId of the container type to unlock. /// public string ContainerItemId { get; set;} /// - /// 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 { get; set;} diff --git a/PlayFabClientSDK/source/PlayFabErrors.cs b/PlayFabClientSDK/source/PlayFabErrors.cs index 9d219582..c66ca2ee 100644 --- a/PlayFabClientSDK/source/PlayFabErrors.cs +++ b/PlayFabClientSDK/source/PlayFabErrors.cs @@ -205,7 +205,8 @@ public enum PlayFabErrorCode InvalidDropTable = 1201, StatisticVersionAlreadyIncrementedForScheduledInterval = 1202, StatisticCountLimitExceeded = 1203, - StatisticVersionIncrementRateExceeded = 1204 + StatisticVersionIncrementRateExceeded = 1204, + ContainerKeyInvalid = 1205 } public class PlayFabError diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index fcbc3a5e..025095d9 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -1927,7 +1927,32 @@ public static async Task> Subtrac } /// - /// 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. + /// + public static async Task> UnlockContainerInstanceAsync(UnlockContainerInstanceRequest request) + { + if (_authKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/UnlockContainerInstance", request, "X-Authorization", _authKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// 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. /// public static async Task> UnlockContainerItemAsync(UnlockContainerItemRequest request) { diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index 2d474864..1d4f0034 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -4881,17 +4881,46 @@ public class UnlinkXboxAccountResult + public class UnlockContainerInstanceRequest + { + + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId { get; set;} + + /// + /// 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 { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + /// + public string CatalogVersion { get; set;} + + + } + + + public class UnlockContainerItemRequest { /// - /// Category ItemId of the container type to unlock. + /// Catalog ItemId of the container type to unlock. /// public string ContainerItemId { get; set;} /// - /// 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 { get; set;} diff --git a/PlayFabSDK/source/PlayFabErrors.cs b/PlayFabSDK/source/PlayFabErrors.cs index 9d219582..c66ca2ee 100644 --- a/PlayFabSDK/source/PlayFabErrors.cs +++ b/PlayFabSDK/source/PlayFabErrors.cs @@ -205,7 +205,8 @@ public enum PlayFabErrorCode InvalidDropTable = 1201, StatisticVersionAlreadyIncrementedForScheduledInterval = 1202, StatisticCountLimitExceeded = 1203, - StatisticVersionIncrementRateExceeded = 1204 + StatisticVersionIncrementRateExceeded = 1204, + ContainerKeyInvalid = 1205 } public class PlayFabError diff --git a/PlayFabSDK/source/PlayFabServerAPI.cs b/PlayFabSDK/source/PlayFabServerAPI.cs index e91b0253..973d7c2a 100644 --- a/PlayFabSDK/source/PlayFabServerAPI.cs +++ b/PlayFabSDK/source/PlayFabServerAPI.cs @@ -1113,6 +1113,56 @@ public static async Task> Subtrac return new PlayFabResult { Result = result }; } + /// + /// 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. + /// + public static async Task> UnlockContainerInstanceAsync(UnlockContainerInstanceRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UnlockContainerInstance", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// 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. + /// + public static async Task> UnlockContainerItemAsync(UnlockContainerItemRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UnlockContainerItem", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the key-value pair data tagged to the specified item, which is read-only from the client. /// diff --git a/PlayFabSDK/source/PlayFabServerModels.cs b/PlayFabSDK/source/PlayFabServerModels.cs index 08c8ab46..0952c920 100644 --- a/PlayFabSDK/source/PlayFabServerModels.cs +++ b/PlayFabSDK/source/PlayFabServerModels.cs @@ -2925,6 +2925,98 @@ public class TitleNewsItem + public class UnlockContainerInstanceRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId { get; set;} + + /// + /// 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 { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + /// + public string CatalogVersion { get; set;} + + + } + + + + public class UnlockContainerItemRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// Catalog ItemId of the container type to unlock. + /// + public string ContainerItemId { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. + /// + public string CatalogVersion { get; set;} + + + } + + + + public class UnlockContainerItemResult + { + + + /// + /// Unique instance identifier of the container unlocked. + /// + public string UnlockedItemInstanceId { get; set;} + + /// + /// Unique instance identifier of the key used to unlock the container, if applicable. + /// + public string UnlockedWithItemInstanceId { get; set;} + + /// + /// Items granted to the player as a result of unlocking the container. + /// + public List GrantedItems { get; set;} + + /// + /// Virtual currency granted to the player as a result of unlocking the container. + /// + public Dictionary VirtualCurrency { get; set;} + + + } + + + public class UpdateCharacterDataRequest { diff --git a/PlayFabServerSDK/source/PlayFabErrors.cs b/PlayFabServerSDK/source/PlayFabErrors.cs index 9d219582..c66ca2ee 100644 --- a/PlayFabServerSDK/source/PlayFabErrors.cs +++ b/PlayFabServerSDK/source/PlayFabErrors.cs @@ -205,7 +205,8 @@ public enum PlayFabErrorCode InvalidDropTable = 1201, StatisticVersionAlreadyIncrementedForScheduledInterval = 1202, StatisticCountLimitExceeded = 1203, - StatisticVersionIncrementRateExceeded = 1204 + StatisticVersionIncrementRateExceeded = 1204, + ContainerKeyInvalid = 1205 } public class PlayFabError diff --git a/PlayFabServerSDK/source/PlayFabServerAPI.cs b/PlayFabServerSDK/source/PlayFabServerAPI.cs index e91b0253..973d7c2a 100644 --- a/PlayFabServerSDK/source/PlayFabServerAPI.cs +++ b/PlayFabServerSDK/source/PlayFabServerAPI.cs @@ -1113,6 +1113,56 @@ public static async Task> Subtrac return new PlayFabResult { Result = result }; } + /// + /// 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. + /// + public static async Task> UnlockContainerInstanceAsync(UnlockContainerInstanceRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UnlockContainerInstance", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + + /// + /// 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. + /// + public static async Task> UnlockContainerItemAsync(UnlockContainerItemRequest request) + { + if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Server/UnlockContainerItem", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey); + if(httpResult is PlayFabError) + { + PlayFabError error = (PlayFabError)httpResult; + if (PlayFabSettings.GlobalErrorHandler != null) + PlayFabSettings.GlobalErrorHandler(error); + return new PlayFabResult { Error = error, }; + } + string resultRawJson = (string)httpResult; + + var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); + var resultData = serializer.Deserialize>(new JsonTextReader(new StringReader(resultRawJson))); + + UnlockContainerItemResult result = resultData.data; + + return new PlayFabResult { Result = result }; + } + /// /// Updates the key-value pair data tagged to the specified item, which is read-only from the client. /// diff --git a/PlayFabServerSDK/source/PlayFabServerModels.cs b/PlayFabServerSDK/source/PlayFabServerModels.cs index 08c8ab46..0952c920 100644 --- a/PlayFabServerSDK/source/PlayFabServerModels.cs +++ b/PlayFabServerSDK/source/PlayFabServerModels.cs @@ -2925,6 +2925,98 @@ public class TitleNewsItem + public class UnlockContainerInstanceRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId { get; set;} + + /// + /// 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 { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog associated with the item instance. + /// + public string CatalogVersion { get; set;} + + + } + + + + public class UnlockContainerItemRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + + /// + /// Catalog ItemId of the container type to unlock. + /// + public string ContainerItemId { get; set;} + + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary catalog. + /// + public string CatalogVersion { get; set;} + + + } + + + + public class UnlockContainerItemResult + { + + + /// + /// Unique instance identifier of the container unlocked. + /// + public string UnlockedItemInstanceId { get; set;} + + /// + /// Unique instance identifier of the key used to unlock the container, if applicable. + /// + public string UnlockedWithItemInstanceId { get; set;} + + /// + /// Items granted to the player as a result of unlocking the container. + /// + public List GrantedItems { get; set;} + + /// + /// Virtual currency granted to the player as a result of unlocking the container. + /// + public Dictionary VirtualCurrency { get; set;} + + + } + + + public class UpdateCharacterDataRequest { From 9baf8f47cbc3b493cabcf8e8a3fad848522c6356 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 19:54:28 +0000 Subject: [PATCH 6/6] Automated build from Jenkins --- PlayFabClientSDK/source/PlayFabVersion.cs | 2 +- PlayFabSDK/source/PlayFabVersion.cs | 2 +- PlayFabServerSDK/source/PlayFabVersion.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PlayFabClientSDK/source/PlayFabVersion.cs b/PlayFabClientSDK/source/PlayFabVersion.cs index 74dd8801..a8a72982 100644 --- a/PlayFabClientSDK/source/PlayFabVersion.cs +++ b/PlayFabClientSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160208"; + public static string SdkRevision = "0.17.160208"; public static string getVersionString() { diff --git a/PlayFabSDK/source/PlayFabVersion.cs b/PlayFabSDK/source/PlayFabVersion.cs index 74dd8801..a8a72982 100644 --- a/PlayFabSDK/source/PlayFabVersion.cs +++ b/PlayFabSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160208"; + public static string SdkRevision = "0.17.160208"; public static string getVersionString() { diff --git a/PlayFabServerSDK/source/PlayFabVersion.cs b/PlayFabServerSDK/source/PlayFabVersion.cs index 74dd8801..a8a72982 100644 --- a/PlayFabServerSDK/source/PlayFabVersion.cs +++ b/PlayFabServerSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string SdkRevision = "0.16.160208"; + public static string SdkRevision = "0.17.160208"; public static string getVersionString() {