Skip to content

Commit

Permalink
Merge pull request #31 from PlayFab/master
Browse files Browse the repository at this point in the history
Pushing new version
  • Loading branch information
Paul Gilmore committed Nov 9, 2015
2 parents bf845c1 + ae71fca commit 961f73b
Show file tree
Hide file tree
Showing 17 changed files with 278 additions and 13 deletions.
19 changes: 19 additions & 0 deletions Licenses/uunit-license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Unity has a custom license and subscription, linked to their editor.
https://unity3d.com/get-unity

We are not distributing the Unity-editor, or any Unity source.

Uunit Download location
http://wiki.unity3d.com/index.php?title=UUnit

License
http://creativecommons.org/licenses/by-sa/3.0/

/*
* UUnit system from UnityCommunity
* Heavily modified
* Stripped of all unity-related code
* 0.4 release by pboechat
* http://wiki.unity3d.com/index.php?title=UUnit
* http://creativecommons.org/licenses/by-sa/3.0/
*/
2 changes: 1 addition & 1 deletion PlayFabClientSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@ public static async Task<PlayFabResult<PurchaseItemResult>> PurchaseItemAsync(Pu
}

/// <summary>
/// Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Promotions->Coupons tab in the PlayFab Game Manager. See this post for more information on coupons: https://playfab.com/blog/2015/06/18/using-stores-and-coupons-game-manager
/// Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Promotions->Coupons tab in the PlayFab Game Manager. See this post for more information on coupons: https://playfab.com/blog/using-stores-and-coupons-game-manager/
/// </summary>
public static async Task<PlayFabResult<RedeemCouponResult>> RedeemCouponAsync(RedeemCouponRequest request)
{
Expand Down
15 changes: 15 additions & 0 deletions PlayFabClientSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4438,6 +4438,11 @@ public class UpdateCharacterDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from CharacterData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -4477,6 +4482,11 @@ public class UpdateSharedGroupDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from GroupData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys in this request.
/// </summary>
Expand Down Expand Up @@ -4506,6 +4516,11 @@ public class UpdateUserDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down
4 changes: 3 additions & 1 deletion PlayFabClientSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public enum PlayFabErrorCode
TradeAcceptedCatalogItemIsNotTradable = 1182,
UsersAlreadyFriends = 1183,
LinkedIdentifierAlreadyClaimed = 1184,
CustomIdNotLinked = 1185
CustomIdNotLinked = 1185,
TotalDataSizeExceeded = 1186,
DeleteKeyConflict = 1187
}

public class PlayFabError
Expand Down
4 changes: 2 additions & 2 deletions PlayFabClientSDK/source/PlayFabVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ namespace PlayFab.Internal
{
public class PlayFabVersion
{
public static string ApiRevision = "1.7.20151019";
public static string SdkRevision = "1.0.2";
public static string ApiRevision = "1.9.20151109";
public static string SdkRevision = "0.9.151109";

public static string getVersionString()
{
Expand Down
10 changes: 10 additions & 0 deletions PlayFabSDK/source/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,11 @@ public class UpdateUserDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -2529,6 +2534,11 @@ public class UpdateUserInternalDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}


}

Expand Down
2 changes: 1 addition & 1 deletion PlayFabSDK/source/PlayFabClientAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@ public static async Task<PlayFabResult<PurchaseItemResult>> PurchaseItemAsync(Pu
}

/// <summary>
/// Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Promotions->Coupons tab in the PlayFab Game Manager. See this post for more information on coupons: https://playfab.com/blog/2015/06/18/using-stores-and-coupons-game-manager
/// Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Promotions->Coupons tab in the PlayFab Game Manager. See this post for more information on coupons: https://playfab.com/blog/using-stores-and-coupons-game-manager/
/// </summary>
public static async Task<PlayFabResult<RedeemCouponResult>> RedeemCouponAsync(RedeemCouponRequest request)
{
Expand Down
15 changes: 15 additions & 0 deletions PlayFabSDK/source/PlayFabClientModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4438,6 +4438,11 @@ public class UpdateCharacterDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from CharacterData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -4477,6 +4482,11 @@ public class UpdateSharedGroupDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from GroupData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys in this request.
/// </summary>
Expand Down Expand Up @@ -4506,6 +4516,11 @@ public class UpdateUserDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down
4 changes: 3 additions & 1 deletion PlayFabSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public enum PlayFabErrorCode
TradeAcceptedCatalogItemIsNotTradable = 1182,
UsersAlreadyFriends = 1183,
LinkedIdentifierAlreadyClaimed = 1184,
CustomIdNotLinked = 1185
CustomIdNotLinked = 1185,
TotalDataSizeExceeded = 1186,
DeleteKeyConflict = 1187
}

public class PlayFabError
Expand Down
32 changes: 32 additions & 0 deletions PlayFabSDK/source/PlayFabServerAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,38 @@ public static async Task<PlayFabResult<MoveItemToUserFromCharacterResult>> MoveI
};
}

/// <summary>
/// Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Promotions->Coupons tab in the PlayFab Game Manager. See this post for more information on coupons: https://playfab.com/blog/2015/06/18/using-stores-and-coupons-game-manager
/// </summary>
public static async Task<PlayFabResult<RedeemCouponResult>> RedeemCouponAsync(RedeemCouponRequest request)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

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

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

RedeemCouponResult result = resultData.data;


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

/// <summary>
/// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially poxic players.
/// </summary>
Expand Down
65 changes: 64 additions & 1 deletion PlayFabSDK/source/PlayFabServerModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,44 @@ public class PlayerLeaderboardEntry



public class RedeemCouponRequest
{


/// <summary>
/// Generated coupon code to redeem.
/// </summary>
public string CouponCode { get; set;}

/// <summary>
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
/// </summary>
public string PlayFabId { get; set;}

/// <summary>
/// Catalog version of the coupon.
/// </summary>
public string CatalogVersion { get; set;}


}



public class RedeemCouponResult
{


/// <summary>
/// Items granted to the player as a result of redeeming the coupon.
/// </summary>
public List<ItemInstance> GrantedItems { get; set;}


}



public class RedeemMatchmakerTicketRequest
{

Expand Down Expand Up @@ -2377,7 +2415,7 @@ public class RemoveFriendRequest
public string FriendPlayFabId { get; set;}

/// <summary>
/// The PlayFab identifier of the player to lose a friend
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
/// </summary>
public string PlayFabId { get; set;}

Expand Down Expand Up @@ -2687,6 +2725,11 @@ public class UpdateCharacterDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from CharacterData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -2759,6 +2802,11 @@ public class UpdateSharedGroupDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from GroupData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys in this request.
/// </summary>
Expand Down Expand Up @@ -2793,6 +2841,11 @@ public class UpdateUserDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -2832,6 +2885,11 @@ public class UpdateUserInternalDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}


}

Expand Down Expand Up @@ -2861,6 +2919,11 @@ public class UpdateUserInventoryItemDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from ItemData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}


}

Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/source/PlayFabVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ namespace PlayFab.Internal
{
public class PlayFabVersion
{
public static string ApiRevision = "1.7.20151019";
public static string SdkRevision = "1.0.2";
public static string ApiRevision = "1.9.20151109";
public static string SdkRevision = "0.9.151109";

public static string getVersionString()
{
Expand Down
10 changes: 10 additions & 0 deletions PlayFabServerSDK/source/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,11 @@ public class UpdateUserDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}

/// <summary>
/// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
/// </summary>
Expand Down Expand Up @@ -2529,6 +2534,11 @@ public class UpdateUserInternalDataRequest
/// </summary>
public Dictionary<string,string> Data { get; set;}

/// <summary>
/// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.
/// </summary>
public List<string> KeysToRemove { get; set;}


}

Expand Down
4 changes: 3 additions & 1 deletion PlayFabServerSDK/source/PlayFabErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public enum PlayFabErrorCode
TradeAcceptedCatalogItemIsNotTradable = 1182,
UsersAlreadyFriends = 1183,
LinkedIdentifierAlreadyClaimed = 1184,
CustomIdNotLinked = 1185
CustomIdNotLinked = 1185,
TotalDataSizeExceeded = 1186,
DeleteKeyConflict = 1187
}

public class PlayFabError
Expand Down
Loading

0 comments on commit 961f73b

Please sign in to comment.