Skip to content

Commit

Permalink
https://api.playfab.com/releaseNotes#160502
Browse files Browse the repository at this point in the history
== SDK Patch Notes, May 2, 2016 ==

=== API Changes ===
New Admin API: SetStoreSegemntOverrides
Some deprecated and internal fields are no longer published with the SDK: ConfirmationMessege and ForceLink. SDK-Upgrade warning: If you were previously setting these fields, simply remove them.

== UnrealBlueprintSDK Specific Changes==
Revised the readme and the example project to use a simpler login process, and the new simpler ExecuteCloudScript method.
When there is an api error, the details of that error will report more accurately and display better debug information.
We are removing the "Beta" flagging from Unreal sdks, they are now a full member of our SDK collection, with full support and quality checks.
  • Loading branch information
pgilmorepf committed May 2, 2016
2 parents 30d1fad + 32cc47f commit 2be8018
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 44 deletions.
7 changes: 1 addition & 6 deletions PlayFabClientSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class AndroidDevicePushNotificationRegistrationRequest
/// <summary>
/// Message to display when confirming push notification.
/// </summary>
public string ConfirmationMessege { get; set;}
public string ConfirmationMessage { get; set;}

/// <summary>
/// Message to display when confirming push notification.
Expand Down Expand Up @@ -2225,11 +2225,6 @@ public class LinkFacebookAccountRequest
/// </summary>
public string AccessToken { get; set;}

/// <summary>
/// If another user is already linked to the account, unlink the other user and re-link.
/// </summary>
public bool? ForceLink { get; set;}

}

public class LinkFacebookAccountResult : PlayFabResultCommon
Expand Down
4 changes: 3 additions & 1 deletion PlayFabClientSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ public enum PlayFabErrorCode
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
OperationNotSupportedForPlatform = 1219,
SegmentNotFound = 1220,
StoreNotFound = 1221
}

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.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";
public static string SdkVersion = "0.25.160502";
public static string SdkVersionString = "CSharpSDK-0.25.160502";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down
25 changes: 25 additions & 0 deletions PlayFabSDK/source/PlayFabAdminAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,31 @@ public static async Task<PlayFabResult<UpdateStoreItemsResult>> SetStoreItemsAsy
return new PlayFabResult<UpdateStoreItemsResult> { Result = result };
}

/// <summary>
/// Sets up a store to be used in an AB test using segments
/// </summary>
public static async Task<PlayFabResult<SetStoreSegemntOverridesResult>> SetStoreSegmentOverridesAsync(SetStoreSegmentOverridesRequest request)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

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

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

SetStoreSegemntOverridesResult result = resultData.data;

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

/// <summary>
/// Creates and updates the key-value store of custom title settings
/// </summary>
Expand Down
37 changes: 37 additions & 0 deletions PlayFabSDK/source/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,29 @@ public class SetPublisherDataResult : PlayFabResultCommon
{
}

public class SetStoreSegemntOverridesResult : PlayFabResultCommon
{
}

public class SetStoreSegmentOverridesRequest
{
/// <summary>
/// Catalog version to use for the request. Defaults to most recent catalog if null.
/// </summary>
public string CatalogVersion { get; set;}

/// <summary>
/// The id of the store being overridden. Requests from the client api to store will return the store associated with the override
/// </summary>
public string BaseStoreId { get; set;}

/// <summary>
/// The list of overrides in order of evaluation.
/// </summary>
public List<StoreSegmentNamePair> Overrides { get; set;}

}

public class SetTitleDataRequest
{
/// <summary>
Expand Down Expand Up @@ -1981,6 +2004,20 @@ public int CompareTo(StoreItem other)

}

public class StoreSegmentNamePair
{
/// <summary>
/// The id of the store being referenced
/// </summary>
public string StoreId { get; set;}

/// <summary>
/// The name of the segment being referenced
/// </summary>
public string SegmentName { get; set;}

}

public class SubtractUserVirtualCurrencyRequest
{
/// <summary>
Expand Down
7 changes: 1 addition & 6 deletions PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class AndroidDevicePushNotificationRegistrationRequest
/// <summary>
/// Message to display when confirming push notification.
/// </summary>
public string ConfirmationMessege { get; set;}
public string ConfirmationMessage { get; set;}

/// <summary>
/// Message to display when confirming push notification.
Expand Down Expand Up @@ -2225,11 +2225,6 @@ public class LinkFacebookAccountRequest
/// </summary>
public string AccessToken { get; set;}

/// <summary>
/// If another user is already linked to the account, unlink the other user and re-link.
/// </summary>
public bool? ForceLink { get; set;}

}

public class LinkFacebookAccountResult : PlayFabResultCommon
Expand Down
4 changes: 3 additions & 1 deletion PlayFabSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ public enum PlayFabErrorCode
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
OperationNotSupportedForPlatform = 1219,
SegmentNotFound = 1220,
StoreNotFound = 1221
}

public class PlayFabError
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.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";
public static string SdkVersion = "0.25.160502";
public static string SdkVersionString = "CSharpSDK-0.25.160502";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down
25 changes: 25 additions & 0 deletions PlayFabServerSDK/source/PlayFabAdminAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,31 @@ public static async Task<PlayFabResult<UpdateStoreItemsResult>> SetStoreItemsAsy
return new PlayFabResult<UpdateStoreItemsResult> { Result = result };
}

/// <summary>
/// Sets up a store to be used in an AB test using segments
/// </summary>
public static async Task<PlayFabResult<SetStoreSegemntOverridesResult>> SetStoreSegmentOverridesAsync(SetStoreSegmentOverridesRequest request)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

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

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

SetStoreSegemntOverridesResult result = resultData.data;

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

/// <summary>
/// Creates and updates the key-value store of custom title settings
/// </summary>
Expand Down
37 changes: 37 additions & 0 deletions PlayFabServerSDK/source/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,29 @@ public class SetPublisherDataResult : PlayFabResultCommon
{
}

public class SetStoreSegemntOverridesResult : PlayFabResultCommon
{
}

public class SetStoreSegmentOverridesRequest
{
/// <summary>
/// Catalog version to use for the request. Defaults to most recent catalog if null.
/// </summary>
public string CatalogVersion { get; set;}

/// <summary>
/// The id of the store being overridden. Requests from the client api to store will return the store associated with the override
/// </summary>
public string BaseStoreId { get; set;}

/// <summary>
/// The list of overrides in order of evaluation.
/// </summary>
public List<StoreSegmentNamePair> Overrides { get; set;}

}

public class SetTitleDataRequest
{
/// <summary>
Expand Down Expand Up @@ -1981,6 +2004,20 @@ public int CompareTo(StoreItem other)

}

public class StoreSegmentNamePair
{
/// <summary>
/// The id of the store being referenced
/// </summary>
public string StoreId { get; set;}

/// <summary>
/// The name of the segment being referenced
/// </summary>
public string SegmentName { get; set;}

}

public class SubtractUserVirtualCurrencyRequest
{
/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion PlayFabServerSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ public enum PlayFabErrorCode
InvalidEventField = 1216,
InvalidEventName = 1217,
CatalogNotConfigured = 1218,
OperationNotSupportedForPlatform = 1219
OperationNotSupportedForPlatform = 1219,
SegmentNotFound = 1220,
StoreNotFound = 1221
}

public class PlayFabError
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.24.160425";
public static string SdkVersionString = "CSharpSDK-0.24.160425";
public static string SdkVersion = "0.25.160502";
public static string SdkVersionString = "CSharpSDK-0.25.160502";

public static bool UseDevelopmentEnvironment = false;
public static string DevelopmentEnvironmentUrl = ".playfabsandbox.com";
Expand Down
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,10 @@ This package contains three different versions of the PlayFab SDK.
* PlayFabSDK - Contains all APIs in one SDK, as well as a unit-test project


#### NuGet

https://www.nuget.org/packages/PlayFabAllSDK/


4. Usage Instructions:
----
#### Current Status:
[![Build status](https://ci.appveyor.com/api/projects/status/n3aw3s8jpgx9bhbq?svg=true)](https://ci.appveyor.com/project/MattAugustine/csharpsdk-jrl6i)


Full:

https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabSDK/bin/Release/PlayFabAllSDK.dll
https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabSDK/bin/Release/PlayFabAllSDK.pdb

Client:

https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabClientSDK/bin/Release/PlayFabClientSDK.dll
https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabClientSDK/bin/Release/PlayFabClientSDK.pdb

Server:

https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabServerSDK/bin/Release/PlayFabServerSDK.dll
https://playfab-csharp-sdk-builds.s3-us-west-2.amazonaws.com/PlayFabServerSDK/bin/Release/PlayFabServerSDK.pdb
1) All users will want to download the latest SDK: https://github.com/PlayFab/CSharpSDK/releases
2) For beginners or quick evaluation, please start with the included example project, and add your own logic and api calls. For advanced users, or users with an existing project, please copy the source from one of the SDK folders into your project.


5. Troubleshooting:
Expand Down

0 comments on commit 2be8018

Please sign in to comment.