Skip to content

Commit

Permalink
Fix another problem with sale price display
Browse files Browse the repository at this point in the history
Summary:
Update the UnitySDK since I'm here.
Found another un-resharpered file.
Treat a price of zero in the vc dict equivalent to undefined.
Demonstrate that the sale prices display correctly when it's RM (T2270)
fixes T2270

Test Plan: manual

Reviewers: james

Maniphest Tasks: T2270

Differential Revision: https://phab.playfabdev.com/D3427
  • Loading branch information
pgilmorepf committed Mar 8, 2017
1 parent 4206e29 commit 3b2bcf7
Show file tree
Hide file tree
Showing 18 changed files with 1,082 additions and 139 deletions.
14 changes: 12 additions & 2 deletions UnicornBattle/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,8 @@ public enum LoginIdentityProvider
Facebook,
IOSDevice,
AndroidDevice,
Twitch
Twitch,
WindowsHello
}

[Serializable]
Expand Down Expand Up @@ -2509,6 +2510,10 @@ public class PlayerProfile
/// </summary>
public DateTime? BannedUntil;
/// <summary>
/// Image URL of the player's avatar.
/// </summary>
public string AvatarUrl;
/// <summary>
/// Dictionary of player's statistics using only the latest version's value
/// </summary>
public Dictionary<string,int> Statistics;
Expand Down Expand Up @@ -3772,7 +3777,8 @@ public enum UserOrigination
CustomId,
XboxLive,
Parse,
Twitch
Twitch,
WindowsHello
}

[Serializable]
Expand Down Expand Up @@ -3845,6 +3851,10 @@ public class UserTitleInfo
/// boolean indicating whether or not the user is currently banned for a title
/// </summary>
public bool? isBanned;
/// <summary>
/// URL to the player's avatar.
/// </summary>
public string AvatarUrl;
}

[Serializable]
Expand Down
68 changes: 68 additions & 0 deletions UnicornBattle/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ public static void GetPhotonAuthenticationToken(GetPhotonAuthenticationTokenRequ
PlayFabHttp.MakeApiCall("/Client/GetPhotonAuthenticationToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData);
}

/// <summary>
/// Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate.
/// </summary>
public static void GetWindowsHelloChallenge(GetWindowsHelloChallengeRequest request, Action<GetWindowsHelloChallengeResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{

PlayFabHttp.MakeApiCall("/Client/GetWindowsHelloChallenge", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Link Windows Hello to the current PlayFab Account
/// </summary>
public static void LinkWindowsHello(LinkWindowsHelloAccountRequest request, Action<LinkWindowsHelloAccountResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{

PlayFabHttp.MakeApiCall("/Client/LinkWindowsHello", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user
/// </summary>
Expand Down Expand Up @@ -153,6 +171,17 @@ public static void LoginWithTwitch(LoginWithTwitchRequest request, Action<LoginR
PlayFabHttp.MakeApiCall("/Client/LoginWithTwitch", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Completes the Windows Hello login flow by returning the signed value of the challange from GetWindowsHelloChallenge. Windows Hello has a 2 step client to server authentication scheme. Step one is to request from the server a challenge string. Step two is to request the user sign the string via Windows Hello and then send the signed value back to the server.
/// </summary>
public static void LoginWithWindowsHello(LoginWithWindowsHelloRequest request, Action<LoginResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{
request.TitleId = request.TitleId ?? PlayFabSettings.TitleId;
if (request.TitleId == null) throw new Exception("Must be have PlayFabSettings.TitleId set to call this method");

PlayFabHttp.MakeApiCall("/Client/LoginWithWindowsHello", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address.
/// </summary>
Expand All @@ -164,6 +193,26 @@ public static void RegisterPlayFabUser(RegisterPlayFabUserRequest request, Actio
PlayFabHttp.MakeApiCall("/Client/RegisterPlayFabUser", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Register using Windows Hello authentication. Before a user can request a challenge or perform a signin the user must first either register or link a Windows Hello account.
/// </summary>
public static void RegisterWithWindowsHello(RegisterWithWindowsHelloRequest request, Action<LoginResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{
request.TitleId = request.TitleId ?? PlayFabSettings.TitleId;
if (request.TitleId == null) throw new Exception("Must be have PlayFabSettings.TitleId set to call this method");

PlayFabHttp.MakeApiCall("/Client/RegisterWithWindowsHello", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Unlink Windows Hello from the current PlayFab Account
/// </summary>
public static void UnlinkWindowsHello(UnlinkWindowsHelloAccountRequest request, Action<UnlinkWindowsHelloAccountResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{

PlayFabHttp.MakeApiCall("/Client/UnlinkWindowsHello", request, AuthType.None, resultCallback, errorCallback, customData);
}

/// <summary>
/// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other players.
/// </summary>
Expand Down Expand Up @@ -483,6 +532,16 @@ public static void UnlinkTwitch(UnlinkTwitchAccountRequest request, Action<Unlin
PlayFabHttp.MakeApiCall("/Client/UnlinkTwitch", request, AuthType.LoginSession, resultCallback, errorCallback, customData);
}

/// <summary>
/// Update the avatar URL of the player
/// </summary>
public static void UpdateAvatarUrl(UpdateAvatarUrlRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{
if (!IsClientLoggedIn()) throw new Exception("Must be logged in to call this method");

PlayFabHttp.MakeApiCall("/Client/UpdateAvatarUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData);
}

/// <summary>
/// Updates the title specific display name for the user
/// </summary>
Expand Down Expand Up @@ -1251,6 +1310,15 @@ public static void GetPlayerTags(GetPlayerTagsRequest request, Action<GetPlayerT
PlayFabHttp.MakeApiCall("/Client/GetPlayerTags", request, AuthType.LoginSession, resultCallback, errorCallback, customData);
}

/// <summary>
/// Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it matches the purchased catalog item
/// </summary>
public static void ValidateWindowsStoreReceipt(ValidateWindowsReceiptRequest request, Action<ValidateWindowsReceiptResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null)
{

PlayFabHttp.MakeApiCall("/Client/ValidateWindowsStoreReceipt", request, AuthType.None, resultCallback, errorCallback, customData);
}


}
}
Expand Down
Loading

0 comments on commit 3b2bcf7

Please sign in to comment.