Skip to content

Commit d97d962

Browse files
https://api.playfab.com/releaseNotes/#170710
2 parents 3cbcebe + c0cd7bd commit d97d962

16 files changed

+1380
-754
lines changed

PlayFabSdk/src/PlayFab/PlayFabAdminApi.js

Lines changed: 127 additions & 94 deletions
Large diffs are not rendered by default.

PlayFabSdk/src/PlayFab/PlayFabClientApi.js

Lines changed: 142 additions & 128 deletions
Large diffs are not rendered by default.

PlayFabSdk/src/PlayFab/PlayFabMatchmakerApi.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ if(!PlayFab._internalSettings) {
2121
PlayFab._internalSettings = {
2222
sessionTicket: null,
2323
productionServerUrl: ".playfabapi.com",
24+
errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
25+
errorLoggedIn: "Must be logged in to call this method",
26+
errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
2427

2528
GetServerUrl: function () {
2629
return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
@@ -99,37 +102,37 @@ if(!PlayFab._internalSettings) {
99102
}
100103
}
101104

102-
PlayFab.buildIdentifier = "jbuild_javascriptsdk_2";
103-
PlayFab.sdkVersion = "1.7.170612";
105+
PlayFab.buildIdentifier = "jbuild_javascriptsdk_0";
106+
PlayFab.sdkVersion = "1.8.170710";
104107

105108
PlayFab.MatchmakerApi = {
106109

107110
AuthUser: function (request, callback) {
108-
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
111+
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
109112

110113
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/AuthUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
111114
},
112115

113116
PlayerJoined: function (request, callback) {
114-
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
117+
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
115118

116119
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerJoined", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
117120
},
118121

119122
PlayerLeft: function (request, callback) {
120-
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
123+
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
121124

122125
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
123126
},
124127

125128
StartGame: function (request, callback) {
126-
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
129+
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
127130

128131
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/StartGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
129132
},
130133

131134
UserInfo: function (request, callback) {
132-
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
135+
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
133136

134137
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/UserInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
135138
},

PlayFabSdk/src/PlayFab/PlayFabServerApi.js

Lines changed: 119 additions & 110 deletions
Large diffs are not rendered by default.

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

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,36 @@
22

33
declare module PlayFabAdminModule {
44
export interface IPlayFabAdmin {
5+
/**
6+
/ Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after this API returns.
7+
/ https://api.playfab.com/Documentation/Admin/method/CreatePlayerSharedSecret
8+
*/
9+
CreatePlayerSharedSecret(request: PlayFabAdminModels.CreatePlayerSharedSecretRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.CreatePlayerSharedSecretResult>): void;
10+
/**
11+
/ Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API returns.
12+
/ https://api.playfab.com/Documentation/Admin/method/DeletePlayerSharedSecret
13+
*/
14+
DeletePlayerSharedSecret(request: PlayFabAdminModels.DeletePlayerSharedSecretRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.DeletePlayerSharedSecretResult>): void;
15+
/**
16+
/ Returns all Player Shared Secret Keys including disabled and expired.
17+
/ https://api.playfab.com/Documentation/Admin/method/GetPlayerSharedSecrets
18+
*/
19+
GetPlayerSharedSecrets(request: PlayFabAdminModels.GetPlayerSharedSecretsRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.GetPlayerSharedSecretsResult>): void;
520
/**
621
/ Gets the requested policy.
722
/ https://api.playfab.com/Documentation/Admin/method/GetPolicy
823
*/
924
GetPolicy(request: PlayFabAdminModels.GetPolicyRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.GetPolicyResponse>): void;
25+
/**
26+
/ Sets or resets the player's secret. Player secrets are used to sign API requests.
27+
/ https://api.playfab.com/Documentation/Admin/method/SetPlayerSecret
28+
*/
29+
SetPlayerSecret(request: PlayFabAdminModels.SetPlayerSecretRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.SetPlayerSecretResult>): void;
30+
/**
31+
/ Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available after this API returns.
32+
/ https://api.playfab.com/Documentation/Admin/method/UpdatePlayerSharedSecret
33+
*/
34+
UpdatePlayerSharedSecret(request: PlayFabAdminModels.UpdatePlayerSharedSecretRequest, callback: PlayFabModule.ApiCallback<PlayFabAdminModels.UpdatePlayerSharedSecretResult>): void;
1035
/**
1136
/ Changes a policy for a title
1237
/ https://api.playfab.com/Documentation/Admin/method/UpdatePolicy
@@ -1404,6 +1429,28 @@ declare module PlayFabAdminModels {
14041429

14051430
}
14061431

1432+
/**
1433+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretRequest
1434+
*/
1435+
export interface CreatePlayerSharedSecretRequest extends PlayFabModule.IPlayFabRequestCommon {
1436+
/**
1437+
/ Friendly name for this key
1438+
*/
1439+
FriendlyName?: string;
1440+
1441+
}
1442+
1443+
/**
1444+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretResult
1445+
*/
1446+
export interface CreatePlayerSharedSecretResult extends PlayFabModule.IPlayFabResultCommon {
1447+
/**
1448+
/ The player shared secret to use when calling Client/GetTitlePublicKey
1449+
*/
1450+
SecretKey?: string;
1451+
1452+
}
1453+
14071454
/**
14081455
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerStatisticDefinitionRequest
14091456
*/
@@ -1619,6 +1666,24 @@ declare module PlayFabAdminModels {
16191666

16201667
}
16211668

1669+
/**
1670+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretRequest
1671+
*/
1672+
export interface DeletePlayerSharedSecretRequest extends PlayFabModule.IPlayFabRequestCommon {
1673+
/**
1674+
/ The shared secret key to delete
1675+
*/
1676+
SecretKey?: string;
1677+
1678+
}
1679+
1680+
/**
1681+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretResult
1682+
*/
1683+
export interface DeletePlayerSharedSecretResult extends PlayFabModule.IPlayFabResultCommon {
1684+
1685+
}
1686+
16221687
/**
16231688
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeleteStoreRequest
16241689
*/
@@ -2106,6 +2171,24 @@ declare module PlayFabAdminModels {
21062171

21072172
}
21082173

2174+
/**
2175+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsRequest
2176+
*/
2177+
export interface GetPlayerSharedSecretsRequest extends PlayFabModule.IPlayFabRequestCommon {
2178+
2179+
}
2180+
2181+
/**
2182+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsResult
2183+
*/
2184+
export interface GetPlayerSharedSecretsResult extends PlayFabModule.IPlayFabResultCommon {
2185+
/**
2186+
/ The player shared secret to use when calling Client/GetTitlePublicKey
2187+
*/
2188+
SharedSecrets?: SharedSecret[];
2189+
2190+
}
2191+
21092192
/**
21102193
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayersInSegmentRequest
21112194
*/
@@ -3352,6 +3435,10 @@ declare module PlayFabAdminModels {
33523435

33533436
}
33543437

3438+
type PushSetupPlatform = "GCM"
3439+
| "APNS"
3440+
| "APNS_SANDBOX";
3441+
33553442
/**
33563443
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.RandomResultTable
33573444
*/
@@ -3761,6 +3848,28 @@ declare module PlayFabAdminModels {
37613848

37623849
}
37633850

3851+
/**
3852+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretRequest
3853+
*/
3854+
export interface SetPlayerSecretRequest extends PlayFabModule.IPlayFabRequestCommon {
3855+
/**
3856+
/ Player secret that is used to verify API request signatures (Enterprise Only).
3857+
*/
3858+
PlayerSecret: string;
3859+
/**
3860+
/ Unique PlayFab assigned ID of the user on whom the operation will be performed.
3861+
*/
3862+
PlayFabId: string;
3863+
3864+
}
3865+
3866+
/**
3867+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretResult
3868+
*/
3869+
export interface SetPlayerSecretResult extends PlayFabModule.IPlayFabResultCommon {
3870+
3871+
}
3872+
37643873
/**
37653874
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPublishedRevisionRequest
37663875
*/
@@ -3865,6 +3974,25 @@ declare module PlayFabAdminModels {
38653974

38663975
}
38673976

3977+
/**
3978+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SharedSecret
3979+
*/
3980+
export interface SharedSecret {
3981+
/**
3982+
/ The player shared secret to use when calling Client/GetTitlePublicKey
3983+
*/
3984+
SecretKey?: string;
3985+
/**
3986+
/ Friendly name for this key
3987+
*/
3988+
FriendlyName?: string;
3989+
/**
3990+
/ Flag to indicate if this key is disabled
3991+
*/
3992+
Disabled: boolean;
3993+
3994+
}
3995+
38683996
type SourceType = "Admin"
38693997
| "BackEnd"
38703998
| "GameClient"
@@ -4132,6 +4260,32 @@ declare module PlayFabAdminModels {
41324260

41334261
}
41344262

4263+
/**
4264+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretRequest
4265+
*/
4266+
export interface UpdatePlayerSharedSecretRequest extends PlayFabModule.IPlayFabRequestCommon {
4267+
/**
4268+
/ The shared secret key to update
4269+
*/
4270+
SecretKey?: string;
4271+
/**
4272+
/ Friendly name for this key
4273+
*/
4274+
FriendlyName?: string;
4275+
/**
4276+
/ Disable or Enable this key
4277+
*/
4278+
Disabled: boolean;
4279+
4280+
}
4281+
4282+
/**
4283+
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretResult
4284+
*/
4285+
export interface UpdatePlayerSharedSecretResult extends PlayFabModule.IPlayFabResultCommon {
4286+
4287+
}
4288+
41354289
/**
41364290
/ https://api.playfab.com/Documentation/Client/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerStatisticDefinitionRequest
41374291
*/

0 commit comments

Comments
 (0)