Skip to content

Commit

Permalink
https://api.playfab.com/releaseNotes/#161017
Browse files Browse the repository at this point in the history
  • Loading branch information
Playfab Jenkins Bot committed Oct 17, 2016
2 parents cbe3ae6 + 12a1a83 commit eba250b
Show file tree
Hide file tree
Showing 19 changed files with 84 additions and 1,302 deletions.
187 changes: 2 additions & 185 deletions PlayFabClientSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public static async Task<PlayFabResult<GetPlayFabIDsFromTwitchIDsResult>> GetPla
/// <summary>
/// NOTE: This call will be deprecated soon. For fetching the data for a given user use GetPlayerCombinedInfo. For looking up users from the client api, we are in the process of adding a new api call. Once that call is ready, this one will be deprecated. Retrieves all requested data for a user in one unified request. By default, this API returns all data for the locally signed-in user. The input parameters may be used to limit the data retrieved to any subset of the available data, as well as retrieve the available data for a different user. Note that certain data, including inventory, virtual currency balances, and personally identifying information, may only be retrieved for the locally signed-in user. In the example below, a request is made for the account details, virtual currency balances, and specified user data for the locally signed-in user.
/// </summary>
[Obsolete("Use 'GetPlayerCombinedInfo' instead", false)]
[Obsolete("Use 'GetPlayerCombinedInfo' instead", true)]
public static async Task<PlayFabResult<GetUserCombinedInfoResult>> GetUserCombinedInfoAsync(GetUserCombinedInfoRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");
Expand Down Expand Up @@ -1249,32 +1249,6 @@ public static async Task<PlayFabResult<GetLeaderboardResult>> GetFriendLeaderboa
return new PlayFabResult<GetLeaderboardResult> { Result = result };
}

/// <summary>
/// Retrieves a list of ranked friends of the current player for the given statistic, centered on the currently signed-in user
/// </summary>
[Obsolete("Use 'GetFriendLeaderboardAroundPlayer' instead", true)]
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("/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(PlayFabUtil.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 friends of the current player for the given statistic, centered on the requested PlayFab user. If PlayFabId is empty or null will return currently logged in user.
/// </summary>
Expand Down Expand Up @@ -1325,32 +1299,6 @@ public static async Task<PlayFabResult<GetLeaderboardResult>> GetLeaderboardAsyn
return new PlayFabResult<GetLeaderboardResult> { Result = result };
}

/// <summary>
/// Retrieves a list of ranked users for the given statistic, centered on the currently signed-in user
/// </summary>
[Obsolete("Use 'GetLeaderboardAroundPlayer' instead", true)]
public static async Task<PlayFabResult<GetLeaderboardAroundCurrentUserResult>> GetLeaderboardAroundCurrentUserAsync(GetLeaderboardAroundCurrentUserRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

GetLeaderboardAroundCurrentUserResult result = resultData.data;

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

/// <summary>
/// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user.
/// </summary>
Expand Down Expand Up @@ -1526,32 +1474,6 @@ public static async Task<PlayFabResult<GetUserDataResult>> GetUserReadOnlyDataAs
return new PlayFabResult<GetUserDataResult> { Result = result };
}

/// <summary>
/// Retrieves the details of all title-specific statistics for the user
/// </summary>
[Obsolete("Use 'GetPlayerStatistics' instead", true)]
public static async Task<PlayFabResult<GetUserStatisticsResult>> GetUserStatisticsAsync(GetUserStatisticsRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

GetUserStatisticsResult result = resultData.data;

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

/// <summary>
/// Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
/// </summary>
Expand Down Expand Up @@ -1627,32 +1549,6 @@ public static async Task<PlayFabResult<UpdateUserDataResult>> UpdateUserPublishe
return new PlayFabResult<UpdateUserDataResult> { Result = result };
}

/// <summary>
/// Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
/// </summary>
[Obsolete("Use 'UpdatePlayerStatistics' instead", true)]
public static async Task<PlayFabResult<UpdateUserStatisticsResult>> UpdateUserStatisticsAsync(UpdateUserStatisticsRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

UpdateUserStatisticsResult result = resultData.data;

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

/// <summary>
/// Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
/// </summary>
Expand Down Expand Up @@ -2453,32 +2349,6 @@ public static async Task<PlayFabResult<ValidateGooglePlayPurchaseResult>> Valida
return new PlayFabResult<ValidateGooglePlayPurchaseResult> { Result = result };
}

/// <summary>
/// Logs a custom analytics event
/// </summary>
[Obsolete("Use 'WritePlayerEvent' instead", true)]
public static async Task<PlayFabResult<LogEventResult>> LogEventAsync(LogEventRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

LogEventResult result = resultData.data;

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

/// <summary>
/// Writes a character-based event into PlayStream.
/// </summary>
Expand Down Expand Up @@ -2704,59 +2574,6 @@ public static async Task<PlayFabResult<ExecuteCloudScriptResult>> ExecuteCloudSc
return new PlayFabResult<ExecuteCloudScriptResult> { Result = result };
}

/// <summary>
/// Retrieves the title-specific URL for Cloud Script servers. This must be queried once, prior to making any calls to RunCloudScript.
/// </summary>
[Obsolete("Use 'ExecuteCloudScript' instead", true)]
public static async Task<PlayFabResult<GetCloudScriptUrlResult>> GetCloudScriptUrlAsync(GetCloudScriptUrlRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

GetCloudScriptUrlResult result = resultData.data;
PlayFabSettings.LogicServerUrl = result.Url;

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

/// <summary>
/// Triggers a particular server action, passing the provided inputs to the hosted Cloud Script. An action in this context is a handler in the JavaScript. NOTE: Before calling this API, you must call GetCloudScriptUrl to be assigned a Cloud Script server URL. When using an official PlayFab SDK, this URL is stored internally in the SDK, but GetCloudScriptUrl must still be manually called.
/// </summary>
[Obsolete("Use 'ExecuteCloudScript' instead", true)]
public static async Task<PlayFabResult<RunCloudScriptResult>> RunCloudScriptAsync(RunCloudScriptRequest request)
{
if (_authKey == null) throw new Exception ("Must be logged in to call this method");

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

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

RunCloudScriptResult result = resultData.data;

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

/// <summary>
/// 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
/// </summary>
Expand Down Expand Up @@ -3275,7 +3092,7 @@ private static async Task<PlayFabResult<AttributeInstallResult>> MultiStepClient
if (PlayFabSettings.AdvertisingIdType == PlayFabSettings.AD_TYPE_IDFA)
request.Idfa = PlayFabSettings.AdvertisingIdValue;
else if (PlayFabSettings.AdvertisingIdType == PlayFabSettings.AD_TYPE_ANDROID_ID)
request.Android_Id = PlayFabSettings.AdvertisingIdValue;
request.Adid = PlayFabSettings.AdvertisingIdValue;
else
return null;
var output = await AttributeInstallAsync(request);
Expand Down
Loading

0 comments on commit eba250b

Please sign in to comment.