Skip to content

Commit

Permalink
Automated build from Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
Playfab Jenkins Bot committed Dec 1, 2015
1 parent 6c6e86a commit df1aeee
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 0 deletions.
66 changes: 66 additions & 0 deletions PlayFabClientSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,40 @@ public static async Task<PlayFabResult<LoginResult>> LoginWithFacebookAsync(Logi
AuthKey = result.SessionTicket ?? AuthKey;


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

/// <summary>
/// Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user
/// </summary>
public static async Task<PlayFabResult<LoginResult>> LoginWithGameCenterAsync(LoginWithGameCenterRequest request)
{
request.TitleId = PlayFabSettings.TitleId ?? request.TitleId;
if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/LoginWithGameCenter", request, null, null);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<LoginResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

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

LoginResult result = resultData.data;
AuthKey = result.SessionTicket ?? AuthKey;


return new PlayFabResult<LoginResult>
{
Result = result
Expand Down Expand Up @@ -1222,6 +1256,38 @@ public static async Task<PlayFabResult<GetLeaderboardResult>> GetFriendLeaderboa
};
}

/// <summary>
/// Retrieves a list of ranked friends of the current player for the given statistic, centered on the currently signed-in user
/// </summary>
public static async Task<PlayFabResult<GetFriendLeaderboardAroundCurrentUserResult>> GetFriendLeaderboardAroundCurrentUserAsync(GetFriendLeaderboardAroundCurrentUserRequest request)
{
if (AuthKey == null) throw new Exception ("Must be logged in to call this method");

object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetFriendLeaderboardAroundCurrentUser", request, "X-Authorization", AuthKey);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<GetFriendLeaderboardAroundCurrentUserResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

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

GetFriendLeaderboardAroundCurrentUserResult result = resultData.data;


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

/// <summary>
/// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard
/// </summary>
Expand Down
67 changes: 67 additions & 0 deletions PlayFabClientSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,49 @@ public class GetContentDownloadUrlResult



public class GetFriendLeaderboardAroundCurrentUserRequest
{


/// <summary>
/// Statistic used to rank players for this leaderboard.
/// </summary>
public string StatisticName { get; set;}

/// <summary>
/// Maximum number of entries to retrieve.
/// </summary>
public int MaxResultsCount { get; set;}

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
public bool? IncludeSteamFriends { get; set;}

/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
public bool? IncludeFacebookFriends { get; set;}


}



public class GetFriendLeaderboardAroundCurrentUserResult
{


/// <summary>
/// Ordered listing of users and their positions in the requested leaderboard.
/// </summary>
public List<PlayerLeaderboardEntry> Leaderboard { get; set;}


}



public class GetFriendLeaderboardRequest
{

Expand Down Expand Up @@ -2869,6 +2912,30 @@ public class LoginWithFacebookRequest



public class LoginWithGameCenterRequest
{


/// <summary>
/// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected
/// </summary>
public string TitleId { get; set;}

/// <summary>
/// Unique Game Center player id.
/// </summary>
public string PlayerId { get; set;}

/// <summary>
/// Automatically create a PlayFab account if one is not currently linked to this Game Center id.
/// </summary>
public bool? CreateAccount { get; set;}


}



public class LoginWithGoogleAccountRequest
{

Expand Down
66 changes: 66 additions & 0 deletions PlayFabSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,40 @@ public static async Task<PlayFabResult<LoginResult>> LoginWithFacebookAsync(Logi
AuthKey = result.SessionTicket ?? AuthKey;


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

/// <summary>
/// Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user
/// </summary>
public static async Task<PlayFabResult<LoginResult>> LoginWithGameCenterAsync(LoginWithGameCenterRequest request)
{
request.TitleId = PlayFabSettings.TitleId ?? request.TitleId;
if(request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/LoginWithGameCenter", request, null, null);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<LoginResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

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

LoginResult result = resultData.data;
AuthKey = result.SessionTicket ?? AuthKey;


return new PlayFabResult<LoginResult>
{
Result = result
Expand Down Expand Up @@ -1222,6 +1256,38 @@ public static async Task<PlayFabResult<GetLeaderboardResult>> GetFriendLeaderboa
};
}

/// <summary>
/// Retrieves a list of ranked friends of the current player for the given statistic, centered on the currently signed-in user
/// </summary>
public static async Task<PlayFabResult<GetFriendLeaderboardAroundCurrentUserResult>> GetFriendLeaderboardAroundCurrentUserAsync(GetFriendLeaderboardAroundCurrentUserRequest request)
{
if (AuthKey == null) throw new Exception ("Must be logged in to call this method");

object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Client/GetFriendLeaderboardAroundCurrentUser", request, "X-Authorization", AuthKey);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<GetFriendLeaderboardAroundCurrentUserResult>
{
Error = error,
};
}
string resultRawJson = (string)httpResult;

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

GetFriendLeaderboardAroundCurrentUserResult result = resultData.data;


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

/// <summary>
/// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard
/// </summary>
Expand Down
67 changes: 67 additions & 0 deletions PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,49 @@ public class GetContentDownloadUrlResult



public class GetFriendLeaderboardAroundCurrentUserRequest
{


/// <summary>
/// Statistic used to rank players for this leaderboard.
/// </summary>
public string StatisticName { get; set;}

/// <summary>
/// Maximum number of entries to retrieve.
/// </summary>
public int MaxResultsCount { get; set;}

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
public bool? IncludeSteamFriends { get; set;}

/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
public bool? IncludeFacebookFriends { get; set;}


}



public class GetFriendLeaderboardAroundCurrentUserResult
{


/// <summary>
/// Ordered listing of users and their positions in the requested leaderboard.
/// </summary>
public List<PlayerLeaderboardEntry> Leaderboard { get; set;}


}



public class GetFriendLeaderboardRequest
{

Expand Down Expand Up @@ -2869,6 +2912,30 @@ public class LoginWithFacebookRequest



public class LoginWithGameCenterRequest
{


/// <summary>
/// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected
/// </summary>
public string TitleId { get; set;}

/// <summary>
/// Unique Game Center player id.
/// </summary>
public string PlayerId { get; set;}

/// <summary>
/// Automatically create a PlayFab account if one is not currently linked to this Game Center id.
/// </summary>
public bool? CreateAccount { get; set;}


}



public class LoginWithGoogleAccountRequest
{

Expand Down

0 comments on commit df1aeee

Please sign in to comment.