Skip to content

Commit a7aba9f

Browse files
https://api.playfab.com/releaseNotes/#190821
1 parent 20a1a69 commit a7aba9f

28 files changed

+725
-189
lines changed

AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAuthenticationModels.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,28 @@ public static class GetEntityTokenResponse {
5353

5454
}
5555

56+
public static enum LoginIdentityProvider {
57+
Unknown,
58+
PlayFab,
59+
Custom,
60+
GameCenter,
61+
GooglePlay,
62+
Steam,
63+
XBoxLive,
64+
PSN,
65+
Kongregate,
66+
Facebook,
67+
IOSDevice,
68+
AndroidDevice,
69+
Twitch,
70+
WindowsHello,
71+
GameServer,
72+
CustomServer,
73+
NintendoSwitch,
74+
FacebookInstantGames,
75+
OpenIdConnect
76+
}
77+
5678
/** Given an entity token, validates that it hasn't exipired or been revoked and will return details of the owner. */
5779
public static class ValidateEntityTokenRequest {
5880
/** Client EntityToken */
@@ -63,6 +85,8 @@ public static class ValidateEntityTokenRequest {
6385
public static class ValidateEntityTokenResponse {
6486
/** The entity id and type. */
6587
public EntityKey Entity;
88+
/** The identity provider for this entity, for the given login */
89+
public LoginIdentityProvider IdentityProvider;
6690
/** The lineage of this profile. */
6791
public EntityLineage Lineage;
6892

AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public static class ConsumePSNEntitlementsResult {
436436
public static class ConsumeXboxEntitlementsRequest {
437437
/** Catalog version to use */
438438
public String CatalogVersion;
439-
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). */
439+
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). */
440440
public String XboxToken;
441441

442442
}
@@ -2164,10 +2164,11 @@ public static class GrantCharacterToUserResult {
21642164
}
21652165

21662166
/**
2167-
* A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item instance (such
2168-
* as Tags, Description, or Custom Data that are set on the root catalog item), a call to GetCatalogItems is required. The
2169-
* Item ID of the instance can then be matched to a catalog entry, which contains the additional information. Also note
2170-
* that Custom Data is only set here from a call to UpdateUserInventoryItemCustomData.
2167+
* A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags,
2168+
* Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can
2169+
* be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when
2170+
* the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields
2171+
* such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase.
21712172
*/
21722173
public static class ItemInstance implements Comparable<ItemInstance> {
21732174
/** Game specific comment associated with this instance when it was added to the user inventory. */
@@ -2197,9 +2198,9 @@ public static class ItemInstance implements Comparable<ItemInstance> {
21972198
public Date PurchaseDate;
21982199
/** Total number of remaining uses, if this is a consumable item. */
21992200
public Integer RemainingUses;
2200-
/** Currency type for the cost of the catalog item. */
2201+
/** Currency type for the cost of the catalog item. Not available when granting items. */
22012202
public String UnitCurrency;
2202-
/** Cost of the catalog item in the given currency. */
2203+
/** Cost of the catalog item in the given currency. Not available when granting items. */
22032204
public Long UnitPrice;
22042205
/** The number of uses that were added or removed to this item in this call. */
22052206
public Integer UsesIncrementedBy;
@@ -2471,7 +2472,7 @@ public static class LinkWindowsHelloAccountResponse {
24712472
public static class LinkXboxAccountRequest {
24722473
/** If another user is already linked to the account, unlink the other user and re-link. */
24732474
public Boolean ForceLink;
2474-
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). */
2475+
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). */
24752476
public String XboxToken;
24762477

24772478
}
@@ -3014,7 +3015,7 @@ public static class LoginWithXboxRequest {
30143015
* title has been selected.
30153016
*/
30163017
public String TitleId;
3017-
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). */
3018+
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). */
30183019
public String XboxToken;
30193020

30203021
}
@@ -3340,6 +3341,23 @@ public static class PurchaseItemResult {
33403341

33413342
}
33423343

3344+
public static class PurchaseReceiptFulfillment {
3345+
/** Items granted to the player in fulfillment of the validated receipt. */
3346+
public ArrayList<ItemInstance> FulfilledItems;
3347+
/**
3348+
* Source of the payment price information for the recorded purchase transaction. A value of 'Request' indicates that the
3349+
* price specified in the request was used, whereas a value of 'Catalog' indicates that the real-money price of the catalog
3350+
* item matching the product ID in the validated receipt transaction and the currency specified in the request (defaulting
3351+
* to USD) was used.
3352+
*/
3353+
public String RecordedPriceSource;
3354+
/** Currency used to purchase the items (ISO 4217 currency code). */
3355+
public String RecordedTransactionCurrency;
3356+
/** Amount of the stated currency paid for the items, in centesimal units */
3357+
public Long RecordedTransactionTotal;
3358+
3359+
}
3360+
33433361
public static enum PushNotificationPlatform {
33443362
ApplePushNotificationService,
33453363
GoogleCloudMessaging
@@ -3563,13 +3581,17 @@ public static class ReportPlayerClientResult {
35633581
* they still exist in the catalog and can be validated.
35643582
*/
35653583
public static class RestoreIOSPurchasesRequest {
3584+
/** Catalog version of the restored items. If null, defaults to primary catalog. */
3585+
public String CatalogVersion;
35663586
/** Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase. */
35673587
public String ReceiptData;
35683588

35693589
}
35703590

35713591
/** Once verified, the valid items will be restored into the user's inventory. */
35723592
public static class RestoreIOSPurchasesResult {
3593+
/** Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. */
3594+
public ArrayList<PurchaseReceiptFulfillment> Fulfillments;
35733595

35743596
}
35753597

@@ -4082,7 +4104,7 @@ public static class UnlinkWindowsHelloAccountResponse {
40824104
}
40834105

40844106
public static class UnlinkXboxAccountRequest {
4085-
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com", ""). */
4107+
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). */
40864108
public String XboxToken;
40874109

40884110
}
@@ -4546,11 +4568,11 @@ public static class UserXboxInfo {
45464568
}
45474569

45484570
public static class ValidateAmazonReceiptRequest {
4549-
/** Catalog version to use when granting receipt item. If null, defaults to primary catalog. */
4571+
/** Catalog version of the fulfilled items. If null, defaults to the primary catalog. */
45504572
public String CatalogVersion;
4551-
/** Currency used for the purchase. */
4573+
/** Currency used to pay for the purchase (ISO 4217 currency code). */
45524574
public String CurrencyCode;
4553-
/** Amount of the stated currency paid for the object. */
4575+
/** Amount of the stated currency paid, in centesimal units. */
45544576
public Integer PurchasePrice;
45554577
/** ReceiptId returned by the Amazon App Store in-app purchase API */
45564578
public String ReceiptId;
@@ -4561,6 +4583,8 @@ public static class ValidateAmazonReceiptRequest {
45614583

45624584
/** Once verified, the catalog item matching the Amazon item name will be added to the user's inventory. */
45634585
public static class ValidateAmazonReceiptResult {
4586+
/** Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. */
4587+
public ArrayList<PurchaseReceiptFulfillment> Fulfillments;
45644588

45654589
}
45664590

@@ -4572,9 +4596,11 @@ public static class ValidateAmazonReceiptResult {
45724596
* avoid granting the same item over and over from a single purchase.
45734597
*/
45744598
public static class ValidateGooglePlayPurchaseRequest {
4575-
/** Currency used for the purchase. */
4599+
/** Catalog version of the fulfilled items. If null, defaults to the primary catalog. */
4600+
public String CatalogVersion;
4601+
/** Currency used to pay for the purchase (ISO 4217 currency code). */
45764602
public String CurrencyCode;
4577-
/** Amount of the stated currency paid for the object. */
4603+
/** Amount of the stated currency paid, in centesimal units. */
45784604
public Long PurchasePrice;
45794605
/** Original JSON string returned by the Google Play IAB API. */
45804606
public String ReceiptJson;
@@ -4588,6 +4614,8 @@ public static class ValidateGooglePlayPurchaseRequest {
45884614
* inventory.
45894615
*/
45904616
public static class ValidateGooglePlayPurchaseResult {
4617+
/** Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. */
4618+
public ArrayList<PurchaseReceiptFulfillment> Fulfillments;
45914619

45924620
}
45934621

@@ -4599,9 +4627,11 @@ public static class ValidateGooglePlayPurchaseResult {
45994627
* $19.99 purchase, for example).
46004628
*/
46014629
public static class ValidateIOSReceiptRequest {
4602-
/** Currency used for the purchase. */
4630+
/** Catalog version of the fulfilled items. If null, defaults to the primary catalog. */
4631+
public String CatalogVersion;
4632+
/** Currency used to pay for the purchase (ISO 4217 currency code). */
46034633
public String CurrencyCode;
4604-
/** Amount of the stated currency paid for the object. */
4634+
/** Amount of the stated currency paid, in centesimal units. */
46054635
public Integer PurchasePrice;
46064636
/** Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase. */
46074637
public String ReceiptData;
@@ -4610,15 +4640,17 @@ public static class ValidateIOSReceiptRequest {
46104640

46114641
/** Once verified, the catalog item matching the iTunes item name will be added to the user's inventory. */
46124642
public static class ValidateIOSReceiptResult {
4643+
/** Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. */
4644+
public ArrayList<PurchaseReceiptFulfillment> Fulfillments;
46134645

46144646
}
46154647

46164648
public static class ValidateWindowsReceiptRequest {
4617-
/** Catalog version to use when granting receipt item. If null, defaults to primary catalog. */
4649+
/** Catalog version of the fulfilled items. If null, defaults to the primary catalog. */
46184650
public String CatalogVersion;
4619-
/** Currency used for the purchase. */
4651+
/** Currency used to pay for the purchase (ISO 4217 currency code). */
46204652
public String CurrencyCode;
4621-
/** Amount of the stated currency paid for the object. */
4653+
/** Amount of the stated currency paid, in centesimal units. */
46224654
public Long PurchasePrice;
46234655
/** XML Receipt returned by the Windows App Store in-app purchase API */
46244656
public String Receipt;
@@ -4627,6 +4659,8 @@ public static class ValidateWindowsReceiptRequest {
46274659

46284660
/** Once verified, the catalog item matching the Product name will be added to the user's inventory. */
46294661
public static class ValidateWindowsReceiptResult {
4662+
/** Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. */
4663+
public ArrayList<PurchaseReceiptFulfillment> Fulfillments;
46304664

46314665
}
46324666

AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMultiplayerAPI.java

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,66 @@ private static PlayFabResult<ListMultiplayerServersResponse> privateListMultipla
18781878
return pfResult;
18791879
}
18801880

1881+
/**
1882+
* Lists quality of service servers for party.
1883+
* @param request ListPartyQosServersRequest
1884+
* @return Async Task will return ListPartyQosServersResponse
1885+
*/
1886+
@SuppressWarnings("unchecked")
1887+
public static FutureTask<PlayFabResult<ListPartyQosServersResponse>> ListPartyQosServersAsync(final ListPartyQosServersRequest request) {
1888+
return new FutureTask(new Callable<PlayFabResult<ListPartyQosServersResponse>>() {
1889+
public PlayFabResult<ListPartyQosServersResponse> call() throws Exception {
1890+
return privateListPartyQosServersAsync(request);
1891+
}
1892+
});
1893+
}
1894+
1895+
/**
1896+
* Lists quality of service servers for party.
1897+
* @param request ListPartyQosServersRequest
1898+
* @return ListPartyQosServersResponse
1899+
*/
1900+
@SuppressWarnings("unchecked")
1901+
public static PlayFabResult<ListPartyQosServersResponse> ListPartyQosServers(final ListPartyQosServersRequest request) {
1902+
FutureTask<PlayFabResult<ListPartyQosServersResponse>> task = new FutureTask(new Callable<PlayFabResult<ListPartyQosServersResponse>>() {
1903+
public PlayFabResult<ListPartyQosServersResponse> call() throws Exception {
1904+
return privateListPartyQosServersAsync(request);
1905+
}
1906+
});
1907+
try {
1908+
task.run();
1909+
return task.get();
1910+
} catch(Exception e) {
1911+
return null;
1912+
}
1913+
}
1914+
1915+
/** Lists quality of service servers for party. */
1916+
@SuppressWarnings("unchecked")
1917+
private static PlayFabResult<ListPartyQosServersResponse> privateListPartyQosServersAsync(final ListPartyQosServersRequest request) throws Exception {
1918+
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
1919+
1920+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListPartyQosServers"), request, "X-EntityToken", PlayFabSettings.EntityToken);
1921+
task.run();
1922+
Object httpResult = task.get();
1923+
if (httpResult instanceof PlayFabError) {
1924+
PlayFabError error = (PlayFabError)httpResult;
1925+
if (PlayFabSettings.GlobalErrorHandler != null)
1926+
PlayFabSettings.GlobalErrorHandler.callback(error);
1927+
PlayFabResult result = new PlayFabResult<ListPartyQosServersResponse>();
1928+
result.Error = error;
1929+
return result;
1930+
}
1931+
String resultRawJson = (String) httpResult;
1932+
1933+
PlayFabJsonSuccess<ListPartyQosServersResponse> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<ListPartyQosServersResponse>>(){}.getType());
1934+
ListPartyQosServersResponse result = resultData.data;
1935+
1936+
PlayFabResult<ListPartyQosServersResponse> pfResult = new PlayFabResult<ListPartyQosServersResponse>();
1937+
pfResult.Result = result;
1938+
return pfResult;
1939+
}
1940+
18811941
/**
18821942
* Lists quality of service servers.
18831943
* @param request ListQosServersRequest

0 commit comments

Comments
 (0)