Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#230109
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Jan 10, 2023
2 parents 02be814 + f2cafa1 commit 399a98f
Show file tree
Hide file tree
Showing 25 changed files with 170 additions and 96 deletions.
29 changes: 25 additions & 4 deletions PlayFabSDK/source/Json/ISerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ public class SimpleJsonInstance : ISerializerPlugin
{
public static PlayFabJsonSerializerStrategy ApiSerializerStrategy = new PlayFabJsonSerializerStrategy();
private static DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;

private static bool _isInvariantCulture = false;

public static bool InvariantCulture
{
get { return _isInvariantCulture; }
set { _isInvariantCulture = value;}
}

private static CultureInfo GetCultureInfoParseType()
{
if(_isInvariantCulture)
{
return CultureInfo.InvariantCulture;
}
else
{
return CultureInfo.CurrentCulture;
}
}

public class PlayFabJsonSerializerStrategy : PocoJsonSerializerStrategy
{
/// <summary>
Expand All @@ -71,14 +92,14 @@ public override object DeserializeObject(object value, Type type)
else if (type == typeof(DateTime))
{
DateTime output;
var result = DateTime.TryParseExact(valueStr, PlayFabUtil.DefaultDateTimeFormats, CultureInfo.CurrentCulture, _dateTimeStyles, out output);
var result = DateTime.TryParseExact(valueStr, PlayFabUtil.DefaultDateTimeFormats, GetCultureInfoParseType(), _dateTimeStyles, out output);
if (result)
return output;
}
else if (type == typeof(DateTimeOffset))
{
DateTimeOffset output;
var result = DateTimeOffset.TryParseExact(valueStr, PlayFabUtil.DefaultDateTimeFormats, CultureInfo.CurrentCulture, _dateTimeStyles, out output);
var result = DateTimeOffset.TryParseExact(valueStr, PlayFabUtil.DefaultDateTimeFormats, GetCultureInfoParseType(), _dateTimeStyles, out output);
if (result)
return output;
}
Expand All @@ -103,12 +124,12 @@ protected override bool TrySerializeKnownTypes(object input, out object output)
}
else if (input is DateTime)
{
output = ((DateTime)input).ToString(PlayFabUtil.DefaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.CurrentCulture);
output = ((DateTime)input).ToString(PlayFabUtil.DefaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], GetCultureInfoParseType());
return true;
}
else if (input is DateTimeOffset)
{
output = ((DateTimeOffset)input).ToString(PlayFabUtil.DefaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.CurrentCulture);
output = ((DateTimeOffset)input).ToString(PlayFabUtil.DefaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], GetCultureInfoParseType());
return true;
}
else if (input is TimeSpan)
Expand Down
8 changes: 6 additions & 2 deletions PlayFabSDK/source/PlayFabAdminAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,10 @@ public static async Task<PlayFabResult<UpdateStoreItemsResult>> SetStoreItemsAsy
}

/// <summary>
/// Creates and updates the key-value store of custom title settings which can be read by the client
/// Creates and updates the key-value store of custom title settings which can be read by the client. For example, a
/// developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths,
/// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new
/// build.
/// </summary>
public static async Task<PlayFabResult<SetTitleDataResult>> SetTitleDataAsync(SetTitleDataRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
{
Expand Down Expand Up @@ -2586,7 +2589,8 @@ public static async Task<PlayFabResult<SetTitleDataAndOverridesResult>> SetTitle
}

/// <summary>
/// Updates the key-value store of custom title settings which cannot be read by the client
/// Updates the key-value store of custom title settings which cannot be read by the client. These values can be used to
/// tweak settings used by game servers and Cloud Scripts without the need to update and re-deploy.
/// </summary>
public static async Task<PlayFabResult<SetTitleDataResult>> SetTitleInternalDataAsync(SetTitleDataRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
{
Expand Down
8 changes: 6 additions & 2 deletions PlayFabSDK/source/PlayFabAdminInstanceAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,10 @@ public async Task<PlayFabResult<UpdateStoreItemsResult>> SetStoreItemsAsync(Upda
}

/// <summary>
/// Creates and updates the key-value store of custom title settings which can be read by the client
/// Creates and updates the key-value store of custom title settings which can be read by the client. For example, a
/// developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths,
/// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new
/// build.
/// </summary>
public async Task<PlayFabResult<SetTitleDataResult>> SetTitleDataAsync(SetTitleDataRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
{
Expand Down Expand Up @@ -2513,7 +2516,8 @@ public async Task<PlayFabResult<SetTitleDataAndOverridesResult>> SetTitleDataAnd
}

/// <summary>
/// Updates the key-value store of custom title settings which cannot be read by the client
/// Updates the key-value store of custom title settings which cannot be read by the client. These values can be used to
/// tweak settings used by game servers and Cloud Scripts without the need to update and re-deploy.
/// </summary>
public async Task<PlayFabResult<SetTitleDataResult>> SetTitleInternalDataAsync(SetTitleDataRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
{
Expand Down
26 changes: 21 additions & 5 deletions PlayFabSDK/source/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,20 @@ public class CheckLimitedEditionItemAvailabilityResult : PlayFabResultCommon

}

public class ChurnPredictionSegmentFilter
{
/// <summary>
/// Comparison
/// </summary>
public SegmentFilterComparison? Comparison ;

/// <summary>
/// RiskLevel
/// </summary>
public ChurnRiskLevel? RiskLevel ;

}

public enum ChurnRiskLevel
{
NoData,
Expand Down Expand Up @@ -5653,6 +5667,11 @@ public class SegmentAndDefinition
/// </summary>
public AllPlayersSegmentFilter AllPlayersFilter ;

/// <summary>
/// Filter property for player churn risk level.
/// </summary>
public ChurnPredictionSegmentFilter ChurnPredictionFilter ;

/// <summary>
/// Filter property for first login date.
/// </summary>
Expand Down Expand Up @@ -6463,11 +6482,8 @@ public class SetTitleDataAndOverridesResult : PlayFabResultCommon
}

/// <summary>
/// This API method is designed to store title specific values which can be read by the client. For example, a developer
/// could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, movement
/// speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new build. This
/// operation is additive. If a Key does not exist in the current dataset, it will be added with the specified Value. If it
/// already exists, the Value for that key will be overwritten with the new Value.
/// This operation is additive. If a Key does not exist in the current dataset, it will be added with the specified Value.
/// If it already exists, the Value for that key will be overwritten with the new Value.
/// </summary>
public class SetTitleDataRequest : PlayFabRequestCommon
{
Expand Down
6 changes: 4 additions & 2 deletions PlayFabSDK/source/PlayFabAuthenticationAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ public static async Task<PlayFabResult<ValidateEntityTokenResponse>> ValidateEnt

var requestContext = request?.AuthenticationContext ?? PlayFabSettings.staticPlayer;
var requestSettings = PlayFabSettings.staticSettings;
if (requestContext.EntityToken == null) throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call Client Login or GetEntityToken before calling this method");

var entityToken = request?.AuthenticationContext?.EntityToken ?? PlayFabSettings.staticPlayer.EntityToken;
if ((entityToken) == null) throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call Client Login or GetEntityToken before calling this method");


var httpResult = await PlayFabHttp.DoPost("/Authentication/ValidateEntityToken", request, "X-EntityToken", requestContext.EntityToken, extraHeaders);
var httpResult = await PlayFabHttp.DoPost("/Authentication/ValidateEntityToken", request, "X-EntityToken", entityToken, extraHeaders);
if (httpResult is PlayFabError)
{
var error = (PlayFabError)httpResult;
Expand Down
6 changes: 4 additions & 2 deletions PlayFabSDK/source/PlayFabAuthenticationInstanceAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ public async Task<PlayFabResult<ValidateEntityTokenResponse>> ValidateEntityToke

var requestContext = request?.AuthenticationContext ?? authenticationContext;
var requestSettings = apiSettings ?? PlayFabSettings.staticSettings;
if (requestContext.EntityToken == null) throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call Client Login or GetEntityToken before calling this method");

var httpResult = await PlayFabHttp.DoPost("/Authentication/ValidateEntityToken", request, "X-EntityToken", requestContext.EntityToken, extraHeaders, requestSettings);
var entityToken = request?.AuthenticationContext?.EntityToken ?? PlayFabSettings.staticPlayer.EntityToken;
if ((entityToken) == null) throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call Client Login or GetEntityToken before calling this method");

var httpResult = await PlayFabHttp.DoPost("/Authentication/ValidateEntityToken", request, "X-EntityToken", entityToken, extraHeaders, requestSettings);
if (httpResult is PlayFabError)
{
var error = (PlayFabError)httpResult;
Expand Down
12 changes: 6 additions & 6 deletions PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2136,13 +2136,13 @@ public class GetFriendLeaderboardAroundPlayerRequest : PlayFabRequestCommon
/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeFacebookFriends ;

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeSteamFriends ;

/// <summary>
Expand Down Expand Up @@ -2220,13 +2220,13 @@ public class GetFriendLeaderboardRequest : PlayFabRequestCommon
/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeFacebookFriends ;

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeSteamFriends ;

/// <summary>
Expand Down Expand Up @@ -2279,13 +2279,13 @@ public class GetFriendsListRequest : PlayFabRequestCommon
/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeFacebookFriends ;

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeSteamFriends ;

/// <summary>
Expand Down
12 changes: 0 additions & 12 deletions PlayFabSDK/source/PlayFabCloudScriptModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -970,12 +970,6 @@ public class PostFunctionResultForPlayerTriggeredActionRequest : PlayFabRequestC
/// </summary>
public Dictionary<string,string> CustomTags ;

/// <summary>
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
/// </summary>
[Obsolete("No longer available", true)]
public EntityKey Entity ;

/// <summary>
/// The result of the function execution.
/// </summary>
Expand All @@ -1000,12 +994,6 @@ public class PostFunctionResultForScheduledTaskRequest : PlayFabRequestCommon
/// </summary>
public Dictionary<string,string> CustomTags ;

/// <summary>
/// The entity to perform this action on.
/// </summary>
[Obsolete("No longer available", true)]
public EntityKey Entity ;

/// <summary>
/// The result of the function execution
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/source/PlayFabMultiplayerModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1940,13 +1940,13 @@ public class FindFriendLobbiesRequest : PlayFabRequestCommon
/// <summary>
/// Controls whether this query should link to friends made on the Facebook network. Defaults to false
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? ExcludeFacebookFriends ;

/// <summary>
/// Controls whether this query should link to friends made on the Steam network. Defaults to false
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? ExcludeSteamFriends ;

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/source/PlayFabSDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<FileAlignment>512</FileAlignment>

<PackageId>PlayFabAllSDK</PackageId>
<Version>1.142.221207</Version>
<Version>1.143.230109</Version>
<Title>PlayFab CSharp Sdk</Title>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
Expand All @@ -21,7 +21,7 @@
<Company>PlayFab</Company>
<Product>PlayFabSDK</Product>
<PackageTags>PlayFab, Baas, Paas, JSON, REST, HTTP, SSL, API, cloud, liveops, game, gamedev, native</PackageTags>
<PackageReleaseNotes>https://docs.microsoft.com/gaming/playfab/release-notes#221207</PackageReleaseNotes>
<PackageReleaseNotes>https://docs.microsoft.com/gaming/playfab/release-notes#230109</PackageReleaseNotes>
<NeutralLanguage>en</NeutralLanguage>
<AssemblyVersion>1</AssemblyVersion>
<FileVersion>1</FileVersion>
Expand Down
8 changes: 4 additions & 4 deletions PlayFabSDK/source/PlayFabServerModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2553,13 +2553,13 @@ public class GetFriendLeaderboardRequest : PlayFabRequestCommon
/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeFacebookFriends ;

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeSteamFriends ;

/// <summary>
Expand Down Expand Up @@ -2617,13 +2617,13 @@ public class GetFriendsListRequest : PlayFabRequestCommon
/// <summary>
/// Indicates whether Facebook friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeFacebookFriends ;

/// <summary>
/// Indicates whether Steam service friends should be included in the response. Default is true.
/// </summary>
[Obsolete("Use 'ExternalPlatformFriends' instead", false)]
[Obsolete("Use 'ExternalPlatformFriends' instead", true)]
public bool? IncludeSteamFriends ;

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions PlayFabSDK/source/PlayFabSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace PlayFab
{
public class PlayFabSettings
{
public const string SdkVersion = "1.142.221207";
public const string BuildIdentifier = "adobuild_csharpsdk_115";
public const string SdkVersionString = "CSharpSDK-1.142.221207";
public const string SdkVersion = "1.143.230109";
public const string BuildIdentifier = "adobuild_csharpsdk_8";
public const string SdkVersionString = "CSharpSDK-1.143.230109";
/// <summary> This is only for customers running a private cluster. Generally you shouldn't touch this </summary>
public static string DefaultProductionEnvironmentUrl = "playfabapi.com";

Expand Down
8 changes: 4 additions & 4 deletions Plugins/CloudScript/source/PlayFabCloudScriptPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<FileAlignment>512</FileAlignment>

<PackageId>PlayFabCloudScriptPlugin</PackageId>
<Version>1.142.221207-alpha</Version>
<Version>1.143.230109-alpha</Version>
<Title>PlayFab CSharp CloudScript Plugin</Title>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
Expand All @@ -19,9 +19,9 @@
<Description>Authentication, in-game commerce, player data, title data, inventory, characters, statistics, leaderboards, analytics and reporting, friends, multiplayer, matchmaking, tournaments, cloud script, trading, real-time event handling, player management, live ops, and server hosting for all major platforms/devices and games of any scale. This sdk gives your game the ability log into PlayFab and access cloud data and services.</Description>
<Company>PlayFab</Company>
<Product>PlayFabCloudScriptPlugin</Product>
<Copyright>Copyright 2022</Copyright>
<Copyright>Copyright 2023</Copyright>
<PackageTags>PlayFab, Baas, Paas, JSON, REST, HTTP, SSL, API, cloud, liveops, game, gamedev, native</PackageTags>
<PackageReleaseNotes>https://docs.microsoft.com/gaming/playfab/release-notes#221207</PackageReleaseNotes>
<PackageReleaseNotes>https://docs.microsoft.com/gaming/playfab/release-notes#230109</PackageReleaseNotes>
<NeutralLanguage>en</NeutralLanguage>
<AssemblyVersion>1</AssemblyVersion>
<FileVersion>1</FileVersion>
Expand All @@ -45,7 +45,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PlayFabAllSDK" Version="1.142.221207" />
<PackageReference Include="PlayFabAllSDK" Version="1.143.230109" />
</ItemGroup>

</Project>
Loading

0 comments on commit 399a98f

Please sign in to comment.