Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Automated build from Jenkins

* Automated build from Jenkins

* Automated build from Jenkins

* Automated build from Jenkins

* Automated build from Jenkins

* Automated build from Jenkins

* Automated build from Jenkins
  • Loading branch information
Paul Gilmore committed Apr 25, 2016
1 parent e1e6ed8 commit 30d1fad
Show file tree
Hide file tree
Showing 14 changed files with 124 additions and 15 deletions.
7 changes: 6 additions & 1 deletion PlayFabClientSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ public class AndroidDevicePushNotificationRegistrationRequest
/// </summary>
public string ConfirmationMessege { get; set;}

/// <summary>
/// Message to display when confirming push notification.
/// </summary>
public string ConfirmationMessage { get; set;}

}

public class AndroidDevicePushNotificationRegistrationResult : PlayFabResultCommon
Expand Down Expand Up @@ -765,7 +770,7 @@ public class ExecuteCloudScriptRequest
public object FunctionParameter { get; set;}

/// <summary>
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision.
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public CloudScriptRevisionOption? RevisionSelection { get; set;}
Expand Down
3 changes: 2 additions & 1 deletion PlayFabClientSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public enum PlayFabErrorCode
EventNotFound = 1215,
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
}

public class PlayFabError
Expand Down
4 changes: 2 additions & 2 deletions PlayFabClientSDK/source/PlayFabSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class PlayFabSettings
};
public static Formatting JsonFormatting = Formatting.None;

public static string SdkVersion = "0.23.160414";
public static string SdkVersionString = "CSharpSDK-0.23.160414";
public static string SdkVersion = "0.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down
2 changes: 1 addition & 1 deletion PlayFabSDK/source/PlayFabAdminAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static async Task<PlayFabResult<UpdateUserTitleDisplayNameResult>> Update
}

/// <summary>
/// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval.
/// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval and an aggregation method.
/// </summary>
public static async Task<PlayFabResult<CreatePlayerStatisticDefinitionResult>> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request)
{
Expand Down
7 changes: 6 additions & 1 deletion PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ public class AndroidDevicePushNotificationRegistrationRequest
/// </summary>
public string ConfirmationMessege { get; set;}

/// <summary>
/// Message to display when confirming push notification.
/// </summary>
public string ConfirmationMessage { get; set;}

}

public class AndroidDevicePushNotificationRegistrationResult : PlayFabResultCommon
Expand Down Expand Up @@ -765,7 +770,7 @@ public class ExecuteCloudScriptRequest
public object FunctionParameter { get; set;}

/// <summary>
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision.
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public CloudScriptRevisionOption? RevisionSelection { get; set;}
Expand Down
3 changes: 2 additions & 1 deletion PlayFabSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public enum PlayFabErrorCode
EventNotFound = 1215,
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
}

public class PlayFabError
Expand Down
25 changes: 25 additions & 0 deletions PlayFabSDK/source/PlayFabServerAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,31 @@ public static async Task<PlayFabResult<ConsumeItemResult>> ConsumeItemAsync(Cons
return new PlayFabResult<ConsumeItemResult> { Result = result };
}

/// <summary>
/// Returns the result of an evaluation of a Random Result Table - the ItemId from the game Catalog which would have been added to the player inventory, if the Random Result Table were added via a Bundle or a call to UnlockContainer.
/// </summary>
public static async Task<PlayFabResult<EvaluateRandomResultTableResult>> EvaluateRandomResultTableAsync(EvaluateRandomResultTableRequest request)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

object httpResult = await PlayFabHTTP.DoPost("/Server/EvaluateRandomResultTable", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<EvaluateRandomResultTableResult> { Error = error, };
}
string resultRawJson = (string)httpResult;

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

EvaluateRandomResultTableResult result = resultData.data;

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

/// <summary>
/// Retrieves the specified character's current inventory of virtual goods
/// </summary>
Expand Down
25 changes: 24 additions & 1 deletion PlayFabSDK/source/PlayFabServerModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,29 @@ public class EmptyResult : PlayFabResultCommon
{
}

public class EvaluateRandomResultTableRequest : PlayFabResultCommon
{
/// <summary>
/// The unique identifier of the Random Result Table to use.
/// </summary>
public string TableId { get; set;}

/// <summary>
/// Specifies the catalog version that should be used to evaluate the Random Result Table. If unspecified, uses default/primary catalog.
/// </summary>
public string CatalogVersion { get; set;}

}

public class EvaluateRandomResultTableResult : PlayFabResultCommon
{
/// <summary>
/// Unique identifier for the item returned from the Random Result Table evaluation, for the given catalog.
/// </summary>
public string ResultItemId { get; set;}

}

public class ExecuteCloudScriptResult : PlayFabResultCommon
{
/// <summary>
Expand Down Expand Up @@ -688,7 +711,7 @@ public class ExecuteCloudScriptServerRequest
public object FunctionParameter { get; set;}

/// <summary>
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision.
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public CloudScriptRevisionOption? RevisionSelection { get; set;}
Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/source/PlayFabSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class PlayFabSettings
};
public static Formatting JsonFormatting = Formatting.None;

public static string SdkVersion = "0.23.160414";
public static string SdkVersionString = "CSharpSDK-0.23.160414";
public static string SdkVersion = "0.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down
2 changes: 1 addition & 1 deletion PlayFabServerSDK/source/PlayFabAdminAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static async Task<PlayFabResult<UpdateUserTitleDisplayNameResult>> Update
}

/// <summary>
/// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval.
/// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval and an aggregation method.
/// </summary>
public static async Task<PlayFabResult<CreatePlayerStatisticDefinitionResult>> CreatePlayerStatisticDefinitionAsync(CreatePlayerStatisticDefinitionRequest request)
{
Expand Down
3 changes: 2 additions & 1 deletion PlayFabServerSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public enum PlayFabErrorCode
EventNotFound = 1215,
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
}

public class PlayFabError
Expand Down
25 changes: 25 additions & 0 deletions PlayFabServerSDK/source/PlayFabServerAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,31 @@ public static async Task<PlayFabResult<ConsumeItemResult>> ConsumeItemAsync(Cons
return new PlayFabResult<ConsumeItemResult> { Result = result };
}

/// <summary>
/// Returns the result of an evaluation of a Random Result Table - the ItemId from the game Catalog which would have been added to the player inventory, if the Random Result Table were added via a Bundle or a call to UnlockContainer.
/// </summary>
public static async Task<PlayFabResult<EvaluateRandomResultTableResult>> EvaluateRandomResultTableAsync(EvaluateRandomResultTableRequest request)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

object httpResult = await PlayFabHTTP.DoPost("/Server/EvaluateRandomResultTable", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
if(httpResult is PlayFabError)
{
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler(error);
return new PlayFabResult<EvaluateRandomResultTableResult> { Error = error, };
}
string resultRawJson = (string)httpResult;

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

EvaluateRandomResultTableResult result = resultData.data;

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

/// <summary>
/// Retrieves the specified character's current inventory of virtual goods
/// </summary>
Expand Down
25 changes: 24 additions & 1 deletion PlayFabServerSDK/source/PlayFabServerModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,29 @@ public class EmptyResult : PlayFabResultCommon
{
}

public class EvaluateRandomResultTableRequest : PlayFabResultCommon
{
/// <summary>
/// The unique identifier of the Random Result Table to use.
/// </summary>
public string TableId { get; set;}

/// <summary>
/// Specifies the catalog version that should be used to evaluate the Random Result Table. If unspecified, uses default/primary catalog.
/// </summary>
public string CatalogVersion { get; set;}

}

public class EvaluateRandomResultTableResult : PlayFabResultCommon
{
/// <summary>
/// Unique identifier for the item returned from the Random Result Table evaluation, for the given catalog.
/// </summary>
public string ResultItemId { get; set;}

}

public class ExecuteCloudScriptResult : PlayFabResultCommon
{
/// <summary>
Expand Down Expand Up @@ -688,7 +711,7 @@ public class ExecuteCloudScriptServerRequest
public object FunctionParameter { get; set;}

/// <summary>
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision.
/// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public CloudScriptRevisionOption? RevisionSelection { get; set;}
Expand Down
4 changes: 2 additions & 2 deletions PlayFabServerSDK/source/PlayFabSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class PlayFabSettings
};
public static Formatting JsonFormatting = Formatting.None;

public static string SdkVersion = "0.23.160414";
public static string SdkVersionString = "CSharpSDK-0.23.160414";
public static string SdkVersion = "0.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down

0 comments on commit 30d1fad

Please sign in to comment.