Skip to content

Commit 05f70b4

Browse files
author
playfabjenkinsbot
committed
https://api.playfab.com/releaseNotes/#171127
2 parents 5350ab2 + 158c599 commit 05f70b4

20 files changed

+664
-1090
lines changed

PlayFabSdk/src/PlayFab/PlayFabAdminApi.js

Lines changed: 20 additions & 103 deletions
Large diffs are not rendered by default.

PlayFabSdk/src/PlayFab/PlayFabClientApi.js

Lines changed: 18 additions & 137 deletions
Large diffs are not rendered by default.

PlayFabSdk/src/PlayFab/PlayFabMatchmakerApi.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ if(!PlayFab.settings) {
2020

2121
if(!PlayFab._internalSettings) {
2222
PlayFab._internalSettings = {
23+
entityToken: null,
2324
sessionTicket: null,
2425
productionServerUrl: ".playfabapi.com",
2526
errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
2627
errorLoggedIn: "Must be logged in to call this method",
28+
errorEntityToken: "You must successfully call GetEntityToken before calling this",
2729
errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
2830

2931
GetServerUrl: function () {
@@ -39,7 +41,7 @@ if(!PlayFab._internalSettings) {
3941
try {
4042
xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
4143
} catch (e) {
42-
console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey]);
44+
console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
4345
}
4446
}
4547
},
@@ -58,8 +60,8 @@ if(!PlayFab._internalSettings) {
5860
// window.console.log("URL: " + completeUrl);
5961
xhr.open("POST", completeUrl, true);
6062

61-
xhr.setRequestHeader('Content-Type', 'application/json');
62-
xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
63+
xhr.setRequestHeader("Content-Type", "application/json");
64+
xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
6365
if (authkey != null)
6466
xhr.setRequestHeader(authkey, authValue);
6567
PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
@@ -123,7 +125,7 @@ if(!PlayFab._internalSettings) {
123125
}
124126

125127
PlayFab.buildIdentifier = "jbuild_javascriptsdk_0";
126-
PlayFab.sdkVersion = "1.16.171106";
128+
PlayFab.sdkVersion = "1.17.171127";
127129
PlayFab.GenerateErrorReport = function (error) {
128130
if (error == null)
129131
return "";
@@ -135,34 +137,33 @@ PlayFab.GenerateErrorReport = function (error) {
135137
};
136138

137139
PlayFab.MatchmakerApi = {
140+
ForgetAllCredentials: function () {
141+
PlayFab._internalSettings.sessionTicket = null;
142+
PlayFab._internalSettings.entityToken = null;
143+
},
138144

139145
AuthUser: function (request, callback, customData, extraHeaders) {
140146
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
141-
142147
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/AuthUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback, customData, extraHeaders);
143148
},
144149

145150
PlayerJoined: function (request, callback, customData, extraHeaders) {
146151
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
147-
148152
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerJoined", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback, customData, extraHeaders);
149153
},
150154

151155
PlayerLeft: function (request, callback, customData, extraHeaders) {
152156
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
153-
154157
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback, customData, extraHeaders);
155158
},
156159

157160
StartGame: function (request, callback, customData, extraHeaders) {
158161
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
159-
160162
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/StartGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback, customData, extraHeaders);
161163
},
162164

163165
UserInfo: function (request, callback, customData, extraHeaders) {
164166
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
165-
166167
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/UserInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback, customData, extraHeaders);
167168
},
168169
};

PlayFabSdk/src/PlayFab/PlayFabServerApi.js

Lines changed: 10 additions & 114 deletions
Large diffs are not rendered by default.

PlayFabSdk/src/Typings/PlayFab/PlayFabAdminApi.d.ts

Lines changed: 51 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
declare module PlayFabAdminModule {
44
export interface IPlayFabAdmin {
5+
ForgetAllCredentials(): void;
6+
57
/**
68
* Abort an ongoing task instance.
79
* https://api.playfab.com/Documentation/Admin/method/AbortTaskInstance
@@ -39,6 +41,11 @@ declare module PlayFabAdminModule {
3941
* https://api.playfab.com/Documentation/Admin/method/BanUsers
4042
*/
4143
BanUsers(request: PlayFabAdminModels.BanUsersRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.BanUsersResult>, customData?: any, extraHeaders?: { [key: string]: string }): void;
44+
/**
45+
* Checks the global count for the limited edition item.
46+
* https://api.playfab.com/Documentation/Admin/method/CheckLimitedEditionItemAvailability
47+
*/
48+
CheckLimitedEditionItemAvailability(request: PlayFabAdminModels.CheckLimitedEditionItemAvailabilityRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.CheckLimitedEditionItemAvailabilityResult>, customData?: any, extraHeaders?: { [key: string]: string }): void;
4249
/**
4350
* Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.
4451
* https://api.playfab.com/Documentation/Admin/method/CreateActionsOnPlayersInSegmentTask
@@ -296,6 +303,11 @@ declare module PlayFabAdminModule {
296303
* https://api.playfab.com/Documentation/Admin/method/GrantItemsToUsers
297304
*/
298305
GrantItemsToUsers(request: PlayFabAdminModels.GrantItemsToUsersRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.GrantItemsToUsersResult>, customData?: any, extraHeaders?: { [key: string]: string }): void;
306+
/**
307+
* Increases the global count for the given scarce resource.
308+
* https://api.playfab.com/Documentation/Admin/method/IncrementLimitedEditionItemAvailability
309+
*/
310+
IncrementLimitedEditionItemAvailability(request: PlayFabAdminModels.IncrementLimitedEditionItemAvailabilityRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.IncrementLimitedEditionItemAvailabilityResult>, customData?: any, extraHeaders?: { [key: string]: string }): void;
299311
/**
300312
* Resets the indicated statistic, removing all player entries for it and backing up the old values.
301313
* https://api.playfab.com/Documentation/Admin/method/IncrementPlayerStatisticVersion
@@ -872,6 +884,22 @@ declare module PlayFabAdminModels {
872884

873885
}
874886

887+
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CheckLimitedEditionItemAvailabilityRequest */
888+
export interface CheckLimitedEditionItemAvailabilityRequest extends PlayFabModule.IPlayFabRequestCommon {
889+
/** Which catalog is being updated. If null, uses the default catalog. */
890+
CatalogVersion?: string;
891+
/** The item to check for. */
892+
ItemId: string;
893+
894+
}
895+
896+
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CheckLimitedEditionItemAvailabilityResult */
897+
export interface CheckLimitedEditionItemAvailabilityResult extends PlayFabModule.IPlayFabResultCommon {
898+
/** The amount of the specified resource remaining. */
899+
Amount: number;
900+
901+
}
902+
875903
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CloudScriptFile */
876904
export interface CloudScriptFile {
877905
/** Contents of the Cloud Script javascript. Must be string-escaped javascript. */
@@ -1951,7 +1979,7 @@ declare module PlayFabAdminModels {
19511979
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPublisherDataResult */
19521980
export interface GetPublisherDataResult extends PlayFabModule.IPlayFabResultCommon {
19531981
/** a dictionary object of key / value pairs */
1954-
Data?: { [key: string]: string };
1982+
Data?: { [key: string]: string | null };
19551983

19561984
}
19571985

@@ -2112,7 +2140,7 @@ declare module PlayFabAdminModels {
21122140
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetTitleDataResult */
21132141
export interface GetTitleDataResult extends PlayFabModule.IPlayFabResultCommon {
21142142
/** a dictionary object of key / value pairs */
2115-
Data?: { [key: string]: string };
2143+
Data?: { [key: string]: string | null };
21162144

21172145
}
21182146

@@ -2194,7 +2222,7 @@ declare module PlayFabAdminModels {
21942222
/** Unique PlayFab assigned ID for a specific character owned by a user */
21952223
CharacterId?: string;
21962224
/** A set of custom key-value pairs on the inventory item. */
2197-
CustomData?: { [key: string]: string };
2225+
CustomData?: { [key: string]: string | null };
21982226
/** CatalogItem.DisplayName at the time this item was purchased. */
21992227
DisplayName?: string;
22002228
/** Timestamp for when this instance will expire. */
@@ -2238,6 +2266,22 @@ declare module PlayFabAdminModels {
22382266

22392267
}
22402268

2269+
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.IncrementLimitedEditionItemAvailabilityRequest */
2270+
export interface IncrementLimitedEditionItemAvailabilityRequest extends PlayFabModule.IPlayFabRequestCommon {
2271+
/** Amount to increase availability by. */
2272+
Amount: number;
2273+
/** Which catalog is being updated. If null, uses the default catalog. */
2274+
CatalogVersion?: string;
2275+
/** The item which needs more availability. */
2276+
ItemId: string;
2277+
2278+
}
2279+
2280+
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.IncrementLimitedEditionItemAvailabilityResult */
2281+
export interface IncrementLimitedEditionItemAvailabilityResult extends PlayFabModule.IPlayFabResultCommon {
2282+
2283+
}
2284+
22412285
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.IncrementPlayerStatisticVersionRequest */
22422286
export interface IncrementPlayerStatisticVersionRequest extends PlayFabModule.IPlayFabRequestCommon {
22432287
/** unique name of the statistic */
@@ -2262,7 +2306,7 @@ declare module PlayFabAdminModels {
22622306
* Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may
22632307
* not begin with a '!' character or be null.
22642308
*/
2265-
Data?: { [key: string]: string };
2309+
Data?: { [key: string]: string | null };
22662310
/** Unique identifier of the catalog item to be granted to the user. */
22672311
ItemId: string;
22682312
/**
@@ -2289,7 +2333,7 @@ declare module PlayFabAdminModels {
22892333
/** Catalog version for the inventory item, when this instance was created. */
22902334
CatalogVersion?: string;
22912335
/** A set of custom key-value pairs on the inventory item. */
2292-
CustomData?: { [key: string]: string };
2336+
CustomData?: { [key: string]: string | null };
22932337
/** CatalogItem.DisplayName at the time this item was purchased. */
22942338
DisplayName?: string;
22952339
/** Timestamp for when this instance will expire. */
@@ -2656,8 +2700,6 @@ declare module PlayFabAdminModels {
26562700
TotalValueToDateInUSD?: number;
26572701
/** List of the player's lifetime purchase totals, summed by real-money currency */
26582702
ValuesToDate?: ValueToDateModel[];
2659-
/** List of the player's virtual currency balances */
2660-
VirtualCurrencyBalances?: VirtualCurrencyBalanceModel[];
26612703

26622704
}
26632705

@@ -3499,7 +3541,7 @@ declare module PlayFabAdminModels {
34993541
* Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may
35003542
* not begin with a '!' character or be null.
35013543
*/
3502-
Data?: { [key: string]: string };
3544+
Data?: { [key: string]: string | null };
35033545
/**
35043546
* Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language
35053547
* constraints. Use this to delete the keys directly.
@@ -3528,7 +3570,7 @@ declare module PlayFabAdminModels {
35283570
* Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may
35293571
* not begin with a '!' character or be null.
35303572
*/
3531-
Data?: { [key: string]: string };
3573+
Data?: { [key: string]: string | null };
35323574
/**
35333575
* Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language
35343576
* constraints. Use this to delete the keys directly.
@@ -3774,15 +3816,6 @@ declare module PlayFabAdminModels {
37743816

37753817
}
37763818

3777-
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.VirtualCurrencyBalanceModel */
3778-
export interface VirtualCurrencyBalanceModel {
3779-
/** Name of the virtual currency */
3780-
Currency?: string;
3781-
/** Balance of the virtual currency */
3782-
TotalValue: number;
3783-
3784-
}
3785-
37863819
/** https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.VirtualCurrencyData */
37873820
export interface VirtualCurrencyData {
37883821
/** unique two-character identifier for this currency type (e.g.: "CC") */

0 commit comments

Comments
 (0)