@@ -21,9 +21,9 @@ if(!PlayFab.settings) {
21
21
if ( ! PlayFab . _internalSettings ) {
22
22
PlayFab . _internalSettings = {
23
23
entityToken : null ,
24
- sdkVersion : "1.63.200402 " ,
24
+ sdkVersion : "1.64.200421 " ,
25
25
requestGetParams : {
26
- sdk : "JavaScriptSDK-1.63.200402 "
26
+ sdk : "JavaScriptSDK-1.64.200421 "
27
27
} ,
28
28
sessionTicket : null ,
29
29
verticalName : null , // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
@@ -231,8 +231,8 @@ if(!PlayFab._internalSettings) {
231
231
}
232
232
}
233
233
234
- PlayFab . buildIdentifier = "jbuild_javascriptsdk__sdk-genericslave-3_1 " ;
235
- PlayFab . sdkVersion = "1.63.200402 " ;
234
+ PlayFab . buildIdentifier = "jbuild_javascriptsdk__sdk-genericslave-3_2 " ;
235
+ PlayFab . sdkVersion = "1.64.200421 " ;
236
236
PlayFab . GenerateErrorReport = function ( error ) {
237
237
if ( error == null )
238
238
return "" ;
@@ -328,6 +328,10 @@ PlayFab.ClientApi = {
328
328
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAccountInfo" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
329
329
} ,
330
330
331
+ GetAdPlacements : function ( request , callback , customData , extraHeaders ) {
332
+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAdPlacements" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
333
+ } ,
334
+
331
335
GetAllUsersCharacters : function ( request , callback , customData , extraHeaders ) {
332
336
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAllUsersCharacters" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
333
337
} ,
@@ -576,6 +580,10 @@ PlayFab.ClientApi = {
576
580
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkKongregate" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
577
581
} ,
578
582
583
+ LinkNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
584
+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkNintendoSwitchAccount" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
585
+ } ,
586
+
579
587
LinkNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
580
588
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkNintendoSwitchDeviceId" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
581
589
} ,
@@ -854,6 +862,31 @@ PlayFab.ClientApi = {
854
862
return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
855
863
} ,
856
864
865
+ LoginWithNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
866
+ request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
867
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
868
+ // Deep-copy the authenticationContext here to safely update it
869
+ var authenticationContext = JSON . parse ( JSON . stringify ( PlayFab . _internalSettings . authenticationContext ) ) ;
870
+ var overloadCallback = function ( result , error ) {
871
+ if ( result != null ) {
872
+ if ( result . data . SessionTicket != null ) {
873
+ PlayFab . _internalSettings . sessionTicket = result . data . SessionTicket ;
874
+ }
875
+ if ( result . data . EntityToken != null ) {
876
+ PlayFab . _internalSettings . entityToken = result . data . EntityToken . EntityToken ;
877
+ }
878
+ // Apply the updates for the AuthenticationContext returned to the client
879
+ authenticationContext = PlayFab . _internalSettings . UpdateAuthenticationContext ( authenticationContext , result ) ;
880
+ PlayFab . ClientApi . _MultiStepClientLogin ( result . data . SettingsForUser . NeedsAttribution ) ;
881
+ }
882
+ if ( callback != null && typeof ( callback ) === "function" )
883
+ callback ( result , error ) ;
884
+ } ;
885
+ PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LoginWithNintendoSwitchAccount" , request , null , overloadCallback , customData , extraHeaders ) ;
886
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
887
+ return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
888
+ } ,
889
+
857
890
LoginWithNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
858
891
request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
859
892
// PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
@@ -1139,6 +1172,10 @@ PlayFab.ClientApi = {
1139
1172
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RemoveSharedGroupMembers" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1140
1173
} ,
1141
1174
1175
+ ReportAdActivity : function ( request , callback , customData , extraHeaders ) {
1176
+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/ReportAdActivity" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1177
+ } ,
1178
+
1142
1179
ReportDeviceInfo : function ( request , callback , customData , extraHeaders ) {
1143
1180
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/ReportDeviceInfo" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1144
1181
} ,
@@ -1151,6 +1188,10 @@ PlayFab.ClientApi = {
1151
1188
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RestoreIOSPurchases" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1152
1189
} ,
1153
1190
1191
+ RewardAdActivity : function ( request , callback , customData , extraHeaders ) {
1192
+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RewardAdActivity" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1193
+ } ,
1194
+
1154
1195
SendAccountRecoveryEmail : function ( request , callback , customData , extraHeaders ) {
1155
1196
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/SendAccountRecoveryEmail" , request , null , callback , customData , extraHeaders ) ;
1156
1197
} ,
@@ -1211,6 +1252,10 @@ PlayFab.ClientApi = {
1211
1252
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkKongregate" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1212
1253
} ,
1213
1254
1255
+ UnlinkNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
1256
+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkNintendoSwitchAccount" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1257
+ } ,
1258
+
1214
1259
UnlinkNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
1215
1260
return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkNintendoSwitchDeviceId" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1216
1261
} ,
0 commit comments