diff --git a/PlayFabClientSDK/source/PlayFabClientAPI.cs b/PlayFabClientSDK/source/PlayFabClientAPI.cs index dcce4721..6daf9992 100644 --- a/PlayFabClientSDK/source/PlayFabClientAPI.cs +++ b/PlayFabClientSDK/source/PlayFabClientAPI.cs @@ -2823,6 +2823,38 @@ public static async Task> GetContentD }; } + /// + /// Lists all of the characters that belong to a specific user. + /// + public static async Task> GetAllUsersCharactersAsync(ListUsersCharactersRequest request) + { + if (AuthKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetAllUsersCharacters", 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))); + + ListUsersCharactersResult result = resultData.data; + + + return new PlayFabResult + { + Result = result + }; + } + /// /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard /// diff --git a/PlayFabClientSDK/source/PlayFabClientModels.cs b/PlayFabClientSDK/source/PlayFabClientModels.cs index e8ec8df7..dce0278b 100644 --- a/PlayFabClientSDK/source/PlayFabClientModels.cs +++ b/PlayFabClientSDK/source/PlayFabClientModels.cs @@ -501,6 +501,21 @@ public class CharacterLeaderboardEntry + public class CharacterResult + { + + + public string CharacterId { get; set;} + + public string CharacterName { get; set;} + + public string CharacterType { get; set;} + + + } + + + public class ConfirmPurchaseRequest { @@ -553,6 +568,11 @@ public class ConsumeItemRequest /// public int ConsumeCount { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } @@ -2636,6 +2656,31 @@ public class LinkSteamAccountResult + public class ListUsersCharactersRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + + } + + + + public class ListUsersCharactersResult + { + + + public List Characters { get; set;} + + + } + + + public class LogEventRequest { @@ -3328,6 +3373,11 @@ public class PurchaseItemRequest /// public string StoreId { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } @@ -4319,6 +4369,11 @@ public class UnlockContainerItemRequest /// public string CatalogVersion { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } diff --git a/PlayFabClientSDK/source/PlayFabVersion.cs b/PlayFabClientSDK/source/PlayFabVersion.cs index 00fe2e68..b485726a 100644 --- a/PlayFabClientSDK/source/PlayFabVersion.cs +++ b/PlayFabClientSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string ApiRevision = "1.4.20150824"; + public static string ApiRevision = "1.5.20150901"; public static string SdkRevision = "1.0.2"; public static string getVersionString() diff --git a/PlayFabSDK/source/PlayFabClientAPI.cs b/PlayFabSDK/source/PlayFabClientAPI.cs index dcce4721..6daf9992 100644 --- a/PlayFabSDK/source/PlayFabClientAPI.cs +++ b/PlayFabSDK/source/PlayFabClientAPI.cs @@ -2823,6 +2823,38 @@ public static async Task> GetContentD }; } + /// + /// Lists all of the characters that belong to a specific user. + /// + public static async Task> GetAllUsersCharactersAsync(ListUsersCharactersRequest request) + { + if (AuthKey == null) throw new Exception ("Must be logged in to call this method"); + + object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetAllUsersCharacters", 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))); + + ListUsersCharactersResult result = resultData.data; + + + return new PlayFabResult + { + Result = result + }; + } + /// /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard /// diff --git a/PlayFabSDK/source/PlayFabClientModels.cs b/PlayFabSDK/source/PlayFabClientModels.cs index e8ec8df7..dce0278b 100644 --- a/PlayFabSDK/source/PlayFabClientModels.cs +++ b/PlayFabSDK/source/PlayFabClientModels.cs @@ -501,6 +501,21 @@ public class CharacterLeaderboardEntry + public class CharacterResult + { + + + public string CharacterId { get; set;} + + public string CharacterName { get; set;} + + public string CharacterType { get; set;} + + + } + + + public class ConfirmPurchaseRequest { @@ -553,6 +568,11 @@ public class ConsumeItemRequest /// public int ConsumeCount { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } @@ -2636,6 +2656,31 @@ public class LinkSteamAccountResult + public class ListUsersCharactersRequest + { + + + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId { get; set;} + + + } + + + + public class ListUsersCharactersResult + { + + + public List Characters { get; set;} + + + } + + + public class LogEventRequest { @@ -3328,6 +3373,11 @@ public class PurchaseItemRequest /// public string StoreId { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } @@ -4319,6 +4369,11 @@ public class UnlockContainerItemRequest /// public string CatalogVersion { get; set;} + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId { get; set;} + } diff --git a/PlayFabSDK/source/PlayFabVersion.cs b/PlayFabSDK/source/PlayFabVersion.cs index 00fe2e68..b485726a 100644 --- a/PlayFabSDK/source/PlayFabVersion.cs +++ b/PlayFabSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string ApiRevision = "1.4.20150824"; + public static string ApiRevision = "1.5.20150901"; public static string SdkRevision = "1.0.2"; public static string getVersionString() diff --git a/PlayFabServerSDK/source/PlayFabVersion.cs b/PlayFabServerSDK/source/PlayFabVersion.cs index 00fe2e68..b485726a 100644 --- a/PlayFabServerSDK/source/PlayFabVersion.cs +++ b/PlayFabServerSDK/source/PlayFabVersion.cs @@ -3,7 +3,7 @@ namespace PlayFab.Internal { public class PlayFabVersion { - public static string ApiRevision = "1.4.20150824"; + public static string ApiRevision = "1.5.20150901"; public static string SdkRevision = "1.0.2"; public static string getVersionString()