Skip to content

Commit

Permalink
Merge pull request #10 from PlayFab/IncApiVersion150901
Browse files Browse the repository at this point in the history
Updating all SDKs after changes to API_Specs
  • Loading branch information
Paul Gilmore committed Sep 1, 2015
2 parents 5c935c1 + 52cefae commit bd42373
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 3 deletions.
32 changes: 32 additions & 0 deletions PlayFabClientSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2823,6 +2823,38 @@ public static async Task<PlayFabResult<GetContentDownloadUrlResult>> GetContentD
};
}

/// <summary>
/// Lists all of the characters that belong to a specific user.
/// </summary>
public static async Task<PlayFabResult<ListUsersCharactersResult>> 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<ListUsersCharactersResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings);
var resultData = serializer.Deserialize<PlayFabJsonSuccess<ListUsersCharactersResult>>(new JsonTextReader(new StringReader(resultRawJson)));

ListUsersCharactersResult result = resultData.data;


return new PlayFabResult<ListUsersCharactersResult>
{
Result = result
};
}

/// <summary>
/// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard
/// </summary>
Expand Down
55 changes: 55 additions & 0 deletions PlayFabClientSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{

Expand Down Expand Up @@ -553,6 +568,11 @@ public class ConsumeItemRequest
/// </summary>
public int ConsumeCount { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down Expand Up @@ -2636,6 +2656,31 @@ public class LinkSteamAccountResult



public class ListUsersCharactersRequest
{


/// <summary>
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
/// </summary>
public string PlayFabId { get; set;}


}



public class ListUsersCharactersResult
{


public List<CharacterResult> Characters { get; set;}


}



public class LogEventRequest
{

Expand Down Expand Up @@ -3328,6 +3373,11 @@ public class PurchaseItemRequest
/// </summary>
public string StoreId { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down Expand Up @@ -4319,6 +4369,11 @@ public class UnlockContainerItemRequest
/// </summary>
public string CatalogVersion { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down
2 changes: 1 addition & 1 deletion PlayFabClientSDK/source/PlayFabVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
32 changes: 32 additions & 0 deletions PlayFabSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2823,6 +2823,38 @@ public static async Task<PlayFabResult<GetContentDownloadUrlResult>> GetContentD
};
}

/// <summary>
/// Lists all of the characters that belong to a specific user.
/// </summary>
public static async Task<PlayFabResult<ListUsersCharactersResult>> 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<ListUsersCharactersResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings);
var resultData = serializer.Deserialize<PlayFabJsonSuccess<ListUsersCharactersResult>>(new JsonTextReader(new StringReader(resultRawJson)));

ListUsersCharactersResult result = resultData.data;


return new PlayFabResult<ListUsersCharactersResult>
{
Result = result
};
}

/// <summary>
/// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard
/// </summary>
Expand Down
55 changes: 55 additions & 0 deletions PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{

Expand Down Expand Up @@ -553,6 +568,11 @@ public class ConsumeItemRequest
/// </summary>
public int ConsumeCount { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down Expand Up @@ -2636,6 +2656,31 @@ public class LinkSteamAccountResult



public class ListUsersCharactersRequest
{


/// <summary>
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
/// </summary>
public string PlayFabId { get; set;}


}



public class ListUsersCharactersResult
{


public List<CharacterResult> Characters { get; set;}


}



public class LogEventRequest
{

Expand Down Expand Up @@ -3328,6 +3373,11 @@ public class PurchaseItemRequest
/// </summary>
public string StoreId { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down Expand Up @@ -4319,6 +4369,11 @@ public class UnlockContainerItemRequest
/// </summary>
public string CatalogVersion { get; set;}

/// <summary>
/// Unique PlayFab assigned ID for a specific character owned by a user
/// </summary>
public string CharacterId { get; set;}


}

Expand Down
2 changes: 1 addition & 1 deletion PlayFabSDK/source/PlayFabVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion PlayFabServerSDK/source/PlayFabVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bd42373

Please sign in to comment.