diff --git a/.arcconfig b/.arcconfig
deleted file mode 100644
index e8806779..00000000
--- a/.arcconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "phabricator.uri" : "https://phab.playfabdev.com/"
-}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 78d1925f..78689f33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,10 @@
-testTitleData.json
\ No newline at end of file
+**/*[Tt]estTitleData.json*
+
+bin/
+obj/
+.vs/
+
+*.map
+*.user
+
+testTitleData.json
diff --git a/JavaScriptGettingStarted.md b/JavaScriptGettingStarted.md
new file mode 100644
index 00000000..b81fe8b3
--- /dev/null
+++ b/JavaScriptGettingStarted.md
@@ -0,0 +1,145 @@
+
+JavaScript Getting Started Guide
+----
+
+This guide will help you make your first API call in JavaScript.
+
+JavaScript Project Setup
+----
+
+* OS: This guide should work in any OS capable of running a web-browser
+* Installation
+ * You are probably already reading this page on your favorite browser
+* New Project Setup
+ * Create a new folder, with two empty text files:
+ * PlayFabGettingStarted.html
+ * PlayFabGettingStarted.js
+* PlayFab installation complete
+
+Set up your first API call
+----
+
+This guide will provide the minimum steps to make your first PlayFab API call. Confirmation will be visible on the webpage.
+
+In your favorite text-editor, update the contents of PlayFabGettingStarted.html as follows:
+```HTML
+
+
+
+
+ PlayFab JavaScript Unit Tests
+
+
+
+
+ PlayFab Getting Started Guide
+ TitleID:
+ CustomID:
+
+ Result:
+
+
+
+```
+
+In your favorite text-editor, update the contents of PlayFabGettingStarted.js as follows:
+```JavaScript
+function DoExampleLoginWithCustomID(){
+ PlayFab.settings.titleId = document.getElementById("titleId").value;
+ var loginRequest = {
+ // Currently, you need to look up the correct format for this object in the API-docs:
+ // https://api.playfab.com/Documentation/Client/method/LoginWithCustomID
+ TitleId: PlayFab.settings.titleId,
+ CustomId: document.getElementById("customId").value,
+ CreateAccount: true
+ };
+
+ PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
+}
+
+var LoginCallback = function (result, error) {
+ if (result !== null) {
+ document.getElementById("resultOutput").innerHTML = "Congratulations, you made your first successful API call!";
+ } else if (error !== null) {
+ document.getElementById("resultOutput").innerHTML =
+ "Something went wrong with your first API call.\n" +
+ "Here's some debug information:\n" +
+ CompileErrorReport(error);
+ }
+}
+
+// This is a utility function we haven't put into the core SDK yet. Feel free to use it.
+function CompileErrorReport(error) {
+ if (error === null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+}
+```
+
+Finish and Execute
+----
+
+* Open PlayFabGettingStarted.html in your favorite browser
+* Click the "Call LoginWithCustomID" button
+* You should see the following text in the Result section:
+```text
+Congratulations, you made your first successful API call!
+```
+
+* At this point, you can start making other api calls, and building your game
+* For a list of all available client API calls, see our documentation:
+ * https://api.playfab.com/
+* Happy coding!
+
+Deconstruct the code
+----
+
+This optional last section describes each part of this example in detail.
+
+The HTML file has a few important lines:
+```HTML
+
+```
+
+This line loads the Client-SDK directly from the PlayFab CDN. Our CDN always hosts the latest version of PlayFabSDK. It may be safer for you to download the files, and use a fixed version: [PlayFab JavaScriptSDK](https://api.playfab.com/sdks/download/javascript)
+
+The other important HTML lines:
+```HTML
+
+...
+
+```
+
+As you can see above, PlayFabGettingStarted.js contains the DoExampleLoginWithCustomID function. These lines bind our js file to our webpage, and invoke the DoExampleLoginWithCustomID function in that script. Everything else is just GUI.
+
+* Line by line breakdown for PlayFabGettingStarted.js
+ * PlayFab.settings.titleId = document.getElementById("titleId").value;
+ * This reads the titleId from the html-input, and sets it to the PlayFab sdk.
+ * Every PlayFab developer creates a title in Game Manager. When you publish your game, you must code that titleId into your game. This lets the client know how to access the correct data within PlayFab. For most users, just consider it a mandatory step that makes PlayFab work.
+ * var loginRequest = { TitleId: PlayFab.settings.titleId, CustomId: "GettingStartedGuide", CreateAccount: true };
+ * Most PlayFab API methods require input parameters, and those input parameters are packed into a request object
+ * Every API method requires a unique request object, with a mix of optional and mandatory parameters
+ * For LoginWithCustomIDRequest, there is a mandatory parameter of CustomId, which uniquely identifies a player and CreateAccount, which allows the creation of a new account with this call. TitleId is another mandatory parameter in JavaScript, and it must match PlayFab.settings.titleId
+ * PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
+ * This begins the async request to "LoginWithCustomID", which will call LoginCallback when the API call is complete
+ * For login, most developers will want to use a more appropriate login method
+ * See the [PlayFab Login Documentation](https://api.playfab.com/Documentation/Client#Authentication) for a list of all login methods, and input parameters. Common choices are:
+ * [LoginWithAndroidDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithAndroidDeviceID)
+ * [LoginWithIOSDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithIOSDeviceID)
+ * [LoginWithEmailAddress](https://api.playfab.com/Documentation/Client/method/LoginWithEmailAddress)
+* LoginCallback contains two parameters: result, error
+ * When successful, error will be null, and the result object will contain the requested information, according to the API called
+ * This result contains some basic information about the player, but for most users, login is simply a mandatory step before calling other APIs.
+ * If error is not null, your API has failed
+ * API calls can fail for many reasons, and you should always attempt to handle failure
+ * Why API calls fail (In order of likelihood)
+ * PlayFabSettings.TitleId is not set. If you forget to set titleId to your title, then nothing will work.
+ * Request parameters. If you have not provided the correct or required information for a particular API call, then it will fail. See error.errorMessage, error.errorDetails, or error.GenerateErrorReport() for more info.
+ * Device connectivity issue. Cell-phones lose/regain connectivity constantly, and so any API call at any time can fail randomly, and then work immediately after. Going into a tunnel can disconnect you completely.
+ * PlayFab server issue. As with all software, there can be issues. See our [release notes](https://api.playfab.com/releaseNotes/) for updates.
+ * The internet is not 100% reliable. Sometimes the message is corrupted or fails to reach the PlayFab server.
+ * If you are having difficulty debugging an issue, and the information within the error information is not sufficient, please visit us on our [forums](https://community.playfab.com/index.html)
diff --git a/JavaScriptJobTemplate.yml b/JavaScriptJobTemplate.yml
new file mode 100644
index 00000000..731e03c9
--- /dev/null
+++ b/JavaScriptJobTemplate.yml
@@ -0,0 +1,58 @@
+# JOB LEVEL TEMPLATE:
+# Used to build JavaScript
+# Reusable
+# Meant to be run from the single JavaScriptTemplate pipeline (default), or
+# from a multi-pipeline such as publishing (should specify alternate params)
+
+parameters:
+- name: ApiSpecSource
+ displayName: ApiSpecSource
+ type: string
+ default: -apiSpecGitUrl https://raw.githubusercontent.com/PlayFab/API_Specs/master/
+- name: CommitMessage
+ displayName: CommitMessage
+ type: string
+ default: Automated build from ADO Pipeline
+- name: GitDestBranch
+ displayName: GitDestBranch
+ type: string
+ default: doNotCommit
+- name: GitJSetupBranch
+ displayName: GitJSetupBranch
+ type: string
+ default: master
+- name: GitSdkGenBranch
+ displayName: GitSdkGenBranch
+ type: string
+ default: master
+- name: isVersioned
+ displayName: isVersioned
+ type: boolean
+ default: false
+- name: expectedNumApiGroups
+ displayName: expectedNumApiGroups
+ type: number
+ default: 14
+- name: SelfTemplateResource
+ displayName: SelfTemplateResource
+ type: string
+ default: self
+
+jobs:
+- job: JavaScriptJobTemplate
+ steps:
+ - bash: echo JavaScriptJobTemplate
+- job: JavaScriptTemplate
+ pool:
+ vmImage: 'windows-latest'
+ steps:
+ - template: JavaScriptStepTemplate.yml
+ parameters:
+ ApiSpecSource: ${{ parameters.ApiSpecSource }}
+ CommitMessage: ${{ parameters.CommitMessage }}
+ GitDestBranch: ${{ parameters.GitDestBranch }}
+ GitJSetupBranch: ${{ parameters.GitJSetupBranch }}
+ GitSdkGenBranch: ${{ parameters.GitSdkGenBranch }}
+ isVersioned: ${{ parameters.isVersioned }}
+ expectedNumApiGroups: ${{ parameters.expectedNumApiGroups }}
+ SelfTemplateResource: ${{ parameters.SelfTemplateResource }}
diff --git a/JavaScriptResourceTemplate.yml b/JavaScriptResourceTemplate.yml
new file mode 100644
index 00000000..0c0328c6
--- /dev/null
+++ b/JavaScriptResourceTemplate.yml
@@ -0,0 +1,30 @@
+# TOP LEVEL TEMPLATE:
+# Can only be used to run the single JavaScriptTemplate pipeline.
+# Why: Resources can only be defined once.
+# This determines the resources available to all "jobs" and "steps" no matter which templates are loaded after this
+# If resources is ever defined again, it'll break so badly that the pipeline won't even parse
+
+resources:
+ repositories:
+ - repository: JenkinsSdkSetupScripts
+ type: github
+ endpoint: GitHub_PlayFab
+ name: PlayFab/JenkinsSdkSetupScripts
+ - repository: API_Specs
+ type: github
+ endpoint: GitHub_PlayFab
+ name: PlayFab/API_Specs
+ - repository: SdkGenerator
+ type: github
+ endpoint: GitHub_PlayFab
+ name: PlayFab/SdkGenerator
+ - repository: JavaScriptSDK
+ endpoint: GitHub_PlayFab
+ type: github
+ name: PlayFab/JavaScriptSDK
+
+jobs:
+- job: JavaScriptResourceTemplate
+ steps:
+ - bash: echo JavaScriptResourceTemplate
+- template: JavaScriptJobTemplate.yml
diff --git a/JavaScriptStepTemplate.yml b/JavaScriptStepTemplate.yml
new file mode 100644
index 00000000..72dbaa6d
--- /dev/null
+++ b/JavaScriptStepTemplate.yml
@@ -0,0 +1,96 @@
+# STEPS LEVEL TEMPLATE:
+# Used to build JavaScript
+# Reusable
+# Used to "hide" the additional variables specific to this SDK which shouldn't be set from a higher level, or
+# shared from a multi-build pipeline like a publish
+
+parameters:
+- name: ApiSpecSource
+ displayName: ApiSpecSource
+ type: string
+ default: -apiSpecGitUrl https://raw.githubusercontent.com/PlayFab/API_Specs/master/
+- name: CommitMessage
+ displayName: CommitMessage
+ type: string
+ default: Automated build from ADO Pipeline
+- name: GitDestBranch
+ displayName: GitDestBranch
+ type: string
+ default: doNotCommit
+- name: SdkName
+ displayName: SdkName
+ type: string
+ default: JavaScriptSDK
+- name: GitJSetupBranch
+ displayName: GitJSetupBranch
+ type: string
+ default: master
+- name: GitSdkGenBranch
+ displayName: GitSdkGenBranch
+ type: string
+ default: master
+- name: isVersioned
+ displayName: isVersioned
+ type: boolean
+ default: false
+- name: expectedNumApiGroups
+ displayName: expectedNumApiGroups
+ type: number
+ default: 14
+- name: SelfTemplateResource
+ displayName: SelfTemplateResource
+ type: string
+ default: self
+
+steps:
+- checkout: JenkinsSdkSetupScripts
+ clean: true
+ path: s
+- checkout: API_Specs
+ clean: true
+ path: s/API_Specs
+- checkout: SdkGenerator
+ clean: true
+ path: s/SdkGenerator
+- checkout: ${{ parameters.SelfTemplateResource }}
+ clean: true
+ submodules: true
+ path: s/sdks/JavaScriptSDK
+ persistCredentials: true
+- bash: |
+ set -e
+
+ echo alias the ADO variables into local variables
+ ApiSpecSource="${{ parameters.ApiSpecSource }}"
+ CommitMessage="${{ parameters.CommitMessage }}"
+ GitDestBranch="${{ parameters.GitDestBranch }}"
+ SdkName="${{ parameters.SdkName }}"
+ WORKSPACE=$(pwd -W)
+ # Hack attempt to get WORKSPACE into a sub-environment
+ export WORKSPACE="$WORKSPACE"
+
+ echo === load util.sh to find msbuild ===
+ . "$WORKSPACE/JenkinsSdkSetupScripts/JenkinsScripts/Pipeline/util.sh"
+
+ . "$WORKSPACE/JenkinsSdkSetupScripts/JenkinsScripts/Pipeline/testInit.sh"
+
+ cd "$WORKSPACE/SDKGenerator/SDKBuildScripts"
+ export PF_TEST_TITLE_DATA_JSON="$WORKSPACE\JenkinsSdkSetupScripts\Creds\testTitleData.json"
+ . ./shared_build.sh
+
+ echo === Build the JavaScript Project ===
+ Find2019MsBuild || Find2017MsBuild
+ "$MSBUILD_EXE" "$WORKSPACE\\sdks\\$SdkName\\PlayFabTestingExample\\PlayFabApiTest.sln" //restore //t:Rebuild
+
+ if [ $isVersioned = true ] ;
+ then
+ echo === publish if necessary ===
+ cd "$WORKSPACE/sdks/$SdkName/PlayFabSdk"
+ npm publish
+ fi
+ displayName: 'Build/Test/Report'
+- task: PublishTestResults@2
+ inputs:
+ testResultsFormat: 'JUnit'
+ testResultsFiles: '*.xml'
+ testRunTitle: JavaScriptTemplate
diff --git a/PlayFabApiTest.html b/PlayFabApiTest.html
deleted file mode 100644
index 1b492770..00000000
--- a/PlayFabApiTest.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- PlayFab JavaScript Unit Tests
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/PlayFabApiTest.js b/PlayFabApiTest.js
deleted file mode 100644
index 753f062d..00000000
--- a/PlayFabApiTest.js
+++ /dev/null
@@ -1,421 +0,0 @@
-if (typeof PlayFabClientSDK == 'undefined')
- Console.error("PlayFabApiTest requires PlayFabClientApi.js to be pre-loaded.");
-if (typeof PlayFabServerSDK == 'undefined')
- Console.error("PlayFabApiTest requires PlayFabServerApi.js to be pre-loaded.");
-
-var PlayFabApiTests = {
- testTitleDataFilename: "testTitleData.json", // TODO: Do not hard code the location of this file (javascript can't really do relative paths either)
- titleData: {
- titleId: null, // put titleId here
- developerSecretKey: null, // put secretKey here
- titleCanUpdateSettings: "true",
- userName: "put test username here",
- userEmail: "put valid email for userName here",
- userPassword: "put valid password for userName here",
- characterName: "put valid characterName for userName here",
- },
- testData: {
- playFabId: null, // Filled during login
- characterId: null, // Filled during character-access
- testNumber: null, // Used by several tests
- },
- testConstants: {
- TEST_KEY: "testCounter",
- TEST_STAT_NAME: "str",
- },
-
- ManualExecution: function () {
- $.getJSON(PlayFabApiTests.testTitleDataFilename, function (json) {
- if (PlayFabApiTests.SetUp(json))
- PlayFabApiTests.LoginTests();
- }).fail(function () {
- if (PlayFabApiTests.SetUp(PlayFabApiTests.titleData))
- PlayFabApiTests.LoginTests();
- });
- },
-
- LoginTests: function () {
- // All tests run completely synchronously, which is a bit tricky.
- // Some test rely on data loaded from other tests, and there's no super easy to force tests to be sequential/dependent
- // In fact, most of the tests return here before they're done, and report back success/fail in some arbitrary future
-
- QUnit.module("PlayFab Api Test");
- QUnit.test("InvalidLogin", PlayFabApiTests.InvalidLogin);
- QUnit.test("LoginOrRegister", PlayFabApiTests.LoginOrRegister);
-
- setTimeout(function () { PlayFabApiTests.PostLoginTests(0); }, 200);
- setTimeout(function () { PlayFabApiTests.PostCharacterTests(0); }, 200);
- },
-
- PostLoginTests: function (count) {
- if (count > 5)
- return;
-
- if (PlayFab._internalSettings.sessionTicket == null) {
- // Wait for login
- setTimeout(function () { PlayFabApiTests.PostLoginTests(count + 1); }, 200);
- } else {
- // Continue with other tests that require login
- QUnit.test("UserDataApi", PlayFabApiTests.UserDataApi);
- QUnit.test("UserStatisticsApi", PlayFabApiTests.UserStatisticsApi);
- QUnit.test("UserCharacter", PlayFabApiTests.UserCharacter);
- QUnit.test("AccountInfo", PlayFabApiTests.AccountInfo);
- QUnit.test("CloudScript", PlayFabApiTests.CloudScript);
- }
- },
-
- PostCharacterTests: function (count) {
- if (count > 5)
- return;
-
- if (PlayFabApiTests.testData.characterId == null) {
- // Wait for characterId
- setTimeout(function () { PlayFabApiTests.PostCharacterTests(count + 1); }, 200);
- } else {
- QUnit.test("LeaderBoard", PlayFabApiTests.LeaderBoard);
- }
- },
-
- SetUp: function (inputTitleData) {
- // All of these must exist for the titleData load to be successful
- var titleDataValid = inputTitleData.hasOwnProperty("titleId") && inputTitleData.titleId != null
- && inputTitleData.hasOwnProperty("developerSecretKey") && inputTitleData.developerSecretKey != null
- && inputTitleData.hasOwnProperty("titleCanUpdateSettings")
- && inputTitleData.hasOwnProperty("userName")
- && inputTitleData.hasOwnProperty("userEmail")
- && inputTitleData.hasOwnProperty("userPassword")
- && inputTitleData.hasOwnProperty("characterName");
-
- if (titleDataValid)
- PlayFabApiTests.titleData = inputTitleData;
- else
- window.console.error("testTitleData input file did not parse correctly");
-
- PlayFab.settings.titleId = PlayFabApiTests.titleData.titleId;
- PlayFab.settings.developerSecretKey = PlayFabApiTests.titleData.developerSecretKey;
-
- return titleDataValid;
- },
-
- CallbackWrapper: function (callbackName, Callback, assert) {
- return function (result, error) {
- try {
- Callback(result, error);
- } catch (e) {
- window.console.error("Exception thrown during " + callbackName + " callback: " + e.toString() + "\n" + e.stack); // Very irritatingly, qunit doesn't report failure results until all async callbacks return, which doesn't always happen when there's an exception
- assert.ok(false, "Exception thrown during " + callbackName + " callback: " + e.toString() + "\n" + e.stack);
- }
- };
- },
-
- VerifyNullError: function (result, error, assert, message) {
- var success = (result != null && error == null)
- if (!success)
- assert.ok(success, message);
- if (error != null)
- assert.ok(false, "PlayFab error message: " + error.errorMessage);
- },
-
- InvalidLogin: function (assert) {
- var invalidRequest = {
- TitleId: PlayFab.settings.titleId,
- Email: PlayFabApiTests.titleData.userEmail,
- Password: PlayFabApiTests.titleData.userPassword + "INVALID",
- };
-
- var InvalidLoginCallback = function (result, error) {
- assert.ok(result == null, "Login should have failed");
- assert.ok(error != null, "Login should have failed");
- if (error != null)
- assert.ok(error.errorMessage.toLowerCase().indexOf("password") > -1, "Expect errorMessage about invalid password: " + error.errorMessage);
- invalidDone();
- };
- var invalidDone = assert.async();
- PlayFabClientSDK.LoginWithEmailAddress(invalidRequest, PlayFabApiTests.CallbackWrapper("InvalidLoginCallback", InvalidLoginCallback, assert));
- },
-
- LoginOrRegister: function (assert) {
- var loginRequest = {
- // Currently, you need to look up the correct format for this object in the API-docs:
- // https://api.playfab.com/Documentation/Client/method/LoginWithEmailAddress
- TitleId: PlayFab.settings.titleId,
- Email: PlayFabApiTests.titleData.userEmail,
- Password: PlayFabApiTests.titleData.userPassword,
- };
- var registerRequest = {
- // Currently, you need to look up the correct format for this object in the API-docs:
- // https://api.playfab.com/Documentation/Client/method/RegisterPlayFabUser
- TitleId: PlayFab.settings.titleId,
- Username: PlayFabApiTests.titleData.userName,
- Email: PlayFabApiTests.titleData.userEmail,
- Password: PlayFabApiTests.titleData.userPassword,
- };
-
- // We don't know at this point how many async calls we'll make
- var loginDone = null;
- var registerDone = null;
-
- var OptionalLoginCallback = function (result, error) {
- // First login falls back upon registration if login failed
- if (result == null) {
- // Register the character and try again
- registerDone = assert.async();
- PlayFabClientSDK.RegisterPlayFabUser(registerRequest, PlayFabApiTests.CallbackWrapper("RegisterCallback", RegisterCallback, assert));
- loginDone();
- }
- else {
- // Confirm the successful login
- MandatoryLoginCallback(result, error)
- }
- };
- var RegisterCallback = function (result, error) {
- // Second login MUST succeed
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing Registration result");
-
- // Log in again, this time with the newly registered account
- loginDone = assert.async();
- PlayFabClientSDK.LoginWithEmailAddress(loginRequest, PlayFabApiTests.CallbackWrapper("MandatoryLoginCallback", MandatoryLoginCallback, assert));
- registerDone();
- };
- var MandatoryLoginCallback = function (result, error) {
- // Login MUST succeed at some point during this test
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing Valid login result");
- assert.ok(PlayFab._internalSettings.sessionTicket != null, "Testing Login credentials cache");
- PlayFabApiTests.testData.playFabId = result.data.PlayFabId; // Save the PlayFabId, it will be used in other tests
- loginDone();
- };
- loginDone = assert.async();
- PlayFabClientSDK.LoginWithEmailAddress(loginRequest, PlayFabApiTests.CallbackWrapper("OptionalLoginCallback", OptionalLoginCallback, assert));
- },
-
- UserDataApi: function (assert) {
- var getDataRequest = {}; // null also works
-
- // This test is always exactly 3 async calls
- get1Done = assert.async();
- updateDone = assert.async();
- get2Done = assert.async();
-
- var GetDataCallback1 = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetUserData result");
- assert.ok(result.data.Data != null, "Testing GetUserData Data");
- assert.ok(result.data.Data.hasOwnProperty(PlayFabApiTests.testConstants.TEST_KEY), "Testing GetUserData DataKey");
-
- PlayFabApiTests.testData.testNumber = parseInt(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].Value, 10);
- PlayFabApiTests.testData.testNumber = (PlayFabApiTests.testData.testNumber + 1) % 100; // This test is about the expected value changing - but not testing more complicated issues like bounds
-
- var updateDataRequest = {}; // Can't create this until we have the testNumber value
- updateDataRequest.Data = {};
- updateDataRequest.Data[PlayFabApiTests.testConstants.TEST_KEY] = PlayFabApiTests.testData.testNumber;
- PlayFabClientSDK.UpdateUserData(updateDataRequest, PlayFabApiTests.CallbackWrapper("UpdateDataCallback", UpdateDataCallback, assert));
- get1Done();
- };
- var UpdateDataCallback = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing UpdateUserData result");
-
- PlayFabClientSDK.GetUserData(getDataRequest, PlayFabApiTests.CallbackWrapper("GetDataCallback2", GetDataCallback2, assert));
- updateDone();
- };
- var GetDataCallback2 = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetUserData result");
- assert.ok(result.data.Data != null, "Testing GetUserData Data");
- assert.ok(result.data.Data.hasOwnProperty(PlayFabApiTests.testConstants.TEST_KEY), "Testing GetUserData DataKey");
-
- var actualtestNumber = parseInt(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].Value, 10);
- var timeUpdated = new Date(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].LastUpdated);
-
- var now = Date.now();
- var testMin = now - (1000 * 60 * 5);
- var testMax = now + (1000 * 60 * 5);
- assert.equal(PlayFabApiTests.testData.testNumber, actualtestNumber, "Testing incrementing counter: " + PlayFabApiTests.testData.testNumber + "==" + actualtestNumber);
- assert.ok(testMin <= timeUpdated && timeUpdated <= testMax, "Testing incrementing timestamp: " + timeUpdated + " vs " + now);
- get2Done();
- };
-
- // Kick off this test process
- PlayFabClientSDK.GetUserData(getDataRequest, PlayFabApiTests.CallbackWrapper("GetDataCallback1", GetDataCallback1, assert));
- },
-
- UserStatisticsApi: function (assert) {
- var getStatsRequest = {}; // null also works
-
- // This test is always exactly 3 async calls
- get1Done = assert.async();
- updateDone = assert.async();
- get2Done = assert.async();
-
- var GetStatsCallback1 = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetUserStats result");
- assert.ok(result.data.UserStatistics != null, "Testing GetUserData Stats");
- assert.ok(result.data.UserStatistics.hasOwnProperty(PlayFabApiTests.testConstants.TEST_STAT_NAME), "Testing GetUserData Stat-value");
-
- PlayFabApiTests.testData.testNumber = result.data.UserStatistics[PlayFabApiTests.testConstants.TEST_STAT_NAME];
- PlayFabApiTests.testData.testNumber = (PlayFabApiTests.testData.testNumber + 1) % 100; // This test is about the expected value changing - but not testing more complicated issues like bounds
-
- var updateStatsRequest = {}; // Can't create this until we have the testNumber value
- updateStatsRequest.UserStatistics = {};
- updateStatsRequest.UserStatistics[PlayFabApiTests.testConstants.TEST_STAT_NAME] = PlayFabApiTests.testData.testNumber;
- PlayFabClientSDK.UpdateUserStatistics(updateStatsRequest, PlayFabApiTests.CallbackWrapper("UpdateStatsCallback", UpdateStatsCallback, assert));
- get1Done();
- };
- var UpdateStatsCallback = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing UpdateUserStats result");
- PlayFabClientSDK.GetUserStatistics(getStatsRequest, PlayFabApiTests.CallbackWrapper("GetStatsCallback2", GetStatsCallback2, assert));
- updateDone();
- };
- var GetStatsCallback2 = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetUserStats result");
- assert.ok(result.data.UserStatistics != null, "Testing GetUserData Stats");
- assert.ok(result.data.UserStatistics.hasOwnProperty(PlayFabApiTests.testConstants.TEST_STAT_NAME), "Testing GetUserData Stat-value");
-
- var actualtestNumber = result.data.UserStatistics[PlayFabApiTests.testConstants.TEST_STAT_NAME];
-
- assert.equal(PlayFabApiTests.testData.testNumber, actualtestNumber, "Testing incrementing stat: " + PlayFabApiTests.testData.testNumber + "==" + actualtestNumber);
- get2Done();
- };
-
- // Kick off this test process
- PlayFabClientSDK.GetUserStatistics(getStatsRequest, PlayFabApiTests.CallbackWrapper("GetStatsCallback1", GetStatsCallback1, assert));
- },
-
- UserCharacter: function (assert) {
- var getCharsRequest = {};
- var grantCharRequest = {
- TitleId: PlayFabApiTests.titleData.titleId,
- PlayFabId: PlayFabApiTests.testData.playFabId,
- CharacterName: PlayFabApiTests.titleData.CHAR_NAME,
- CharacterType: PlayFabApiTests.titleData.CHAR_TEST_TYPE,
- };
-
- // We don't know at this point how many async calls we'll make
- var getDone = null;
- var grantDone = null;
-
- var OptionalGetCharsCallback = function (result, error) {
- // First get chars falls back upon grant-char if target character not present
- if (result == null) {
- // Register the character and try again
- grantDone = assert.async();
- PlayFabServerSDK.GrantCharacterToUser(grantCharRequest, PlayFabApiTests.CallbackWrapper("GrantCharCallback", GrantCharCallback, assert));
- getDone();
- }
- else {
- // Confirm the successful login
- MandatoryGetCharsCallback(result, error)
- }
- };
- var GrantCharCallback = function (result, error) {
- // Second character callback MUST succeed
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GrantCharacter result");
-
- // Get chars again, this time with the newly granted character
- getDone = assert.async();
- PlayFabClientSDK.GetAllUsersCharacters(getCharsRequest, PlayFabApiTests.CallbackWrapper("MandatoryGetCharsCallback", MandatoryGetCharsCallback, assert));
- grantDone();
- };
- var MandatoryGetCharsCallback = function (result, error) {
- // GetChars MUST succeed at some point during this test
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetChars result");
-
- for (var i in result.data.Characters)
- if (result.data.Characters[i].CharacterName == PlayFabApiTests.titleData.characterName)
- PlayFabApiTests.testData.characterId = result.data.Characters[i].CharacterId; // Save the characterId, it will be used in other tests
-
- assert.ok(PlayFabApiTests.testData.characterId != null, "Searching for " + PlayFabApiTests.titleData.characterName + " on this account.");
- getDone();
- };
- getDone = assert.async();
- PlayFabClientSDK.GetAllUsersCharacters(getCharsRequest, PlayFabApiTests.CallbackWrapper("OptionalGetCharsCallback", OptionalGetCharsCallback, assert));
- },
-
- LeaderBoard: function (assert) {
- var clientRequest = {
- MaxResultsCount: 3,
- StatisticName: PlayFabApiTests.testConstants.TEST_STAT_NAME,
- };
- var serverRequest = {
- MaxResultsCount: 3,
- PlayFabId: PlayFabApiTests.testData.playFabId,
- CharacterId: PlayFabApiTests.testData.characterId,
- StatisticName: PlayFabApiTests.testConstants.TEST_STAT_NAME,
- };
-
- var GetLeaderboardCallback_C = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetLeaderboard result");
- if (result != null) {
- assert.ok(result.data.Leaderboard != null, "Testing GetLeaderboard content");
- assert.ok(result.data.Leaderboard.length > 0, "Testing GetLeaderboard content-length");
- }
-
- lbDone_C();
- };
- var GetLeaderboardCallback_S = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetLeaderboard result");
- if (result != null) {
- assert.ok(result.data.Leaderboard != null, "Testing GetLeaderboard content");
- assert.ok(result.data.Leaderboard.length > 0, "Testing GetLeaderboard content-length");
- }
-
- lbDone_S();
- };
-
- var lbDone_C = assert.async();
- PlayFabClientSDK.GetLeaderboardAroundCurrentUser(clientRequest, PlayFabApiTests.CallbackWrapper("GetLeaderboardCallback_C", GetLeaderboardCallback_C, assert));
- var lbDone_S = assert.async();
- PlayFabServerSDK.GetLeaderboardAroundCharacter(serverRequest, PlayFabApiTests.CallbackWrapper("GetLeaderboardCallback_S", GetLeaderboardCallback_S, assert));
- },
-
- AccountInfo: function (assert) {
- var GetAccountInfoCallback = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetAccountInfo result");
- assert.ok(result.data.AccountInfo != null, "Testing GetAccountInfo");
- assert.ok(result.data.AccountInfo.TitleInfo != null, "Testing TitleInfo");
- assert.ok(result.data.AccountInfo.TitleInfo.Origination != null, "Testing Origination");
- assert.ok(result.data.AccountInfo.TitleInfo.Origination.length > 0, "Testing Origination string-Enum");
- getDone();
- };
-
- var getDone = assert.async();
- PlayFabClientSDK.GetAccountInfo({}, PlayFabApiTests.CallbackWrapper("GetAccountInfoCallback", GetAccountInfoCallback, assert));
- },
-
- CloudScript: function (assert) {
- var urlDone = null;
- var hwDone = null;
-
- if (PlayFab._internalSettings.logicServerUrl == null) {
- var getCloudUrlRequest = {};
-
- var GetCloudScriptUrlCallback = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing GetCloudUrl response");
-
- if (PlayFab._internalSettings.logicServerUrl != null)
- PlayFabApiTests.CloudScript(assert); // Recursively call this test to get the case below
- else
- assert.ok(false, "GetCloudScriptUrl did not retrieve the logicServerUrl");
-
- urlDone();
- };
-
- urlDone = assert.async();
- PlayFabClientSDK.GetCloudScriptUrl(getCloudUrlRequest, PlayFabApiTests.CallbackWrapper("GetCloudScriptUrlCallback", GetCloudScriptUrlCallback, assert));
- } else {
- var helloWorldRequest = { ActionId: "helloWorld" };
-
- var HelloWorldCallback = function (result, error) {
- PlayFabApiTests.VerifyNullError(result, error, assert, "Testing HelloWorld response");
- if (result != null) {
- assert.ok(result.data.Results != null, "Testing HelloWorld result");
- assert.ok(result.data.Results.messageValue != null, "Testing HelloWorld result message");
- assert.equal(result.data.Results.messageValue, "Hello " + PlayFabApiTests.testData.playFabId + "!", "HelloWorld cloudscript result: " + result.data.Results.messageValue);
- }
- hwDone();
- };
-
- hwDone = assert.async();
- PlayFabClientSDK.RunCloudScript(helloWorldRequest, PlayFabApiTests.CallbackWrapper("HelloWorldCallback", HelloWorldCallback, assert));
- }
- },
-};
-
-PlayFabApiTests.ManualExecution();
diff --git a/PlayFabSDK/PlayFabAdminApi.js b/PlayFabSDK/PlayFabAdminApi.js
deleted file mode 100644
index 090ac4e1..00000000
--- a/PlayFabSDK/PlayFabAdminApi.js
+++ /dev/null
@@ -1,445 +0,0 @@
-var PlayFab = typeof PlayFab != 'undefined' ? PlayFab : {};
-
-if(!PlayFab.settings) {
- PlayFab.settings = {
- titleId: null,
- developerSecretKey: null // For security reasons you must never expose this value to the client or players
- }
-}
-
-if(!PlayFab._internalSettings) {
- PlayFab._internalSettings = {
- sessionTicket: null,
- sdkVersion: "0.3.151116",
- productionServerUrl: ".playfabapi.com",
- logicServerUrl: null,
-
- getServerUrl: function () {
- return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
- },
-
- getLogicServerUrl: function () {
- return PlayFab._internalSettings.logicServerUrl;
- },
-
- executeRequest: function (completeUrl, data, authkey, authValue, callback) {
- if (callback != null && typeof (callback) != "function") {
- throw "Callback must be null of a function";
- }
-
- if (data == null) {
- data = {};
- }
-
- var startTime = new Date();
-
- var requestBody = JSON.stringify(data);
-
- var xhr = new XMLHttpRequest();completeUrl
- // window.console.log("URL: " + completeUrl);
- xhr.open("POST", completeUrl, true);
-
- xhr.setRequestHeader('Content-Type', 'application/json');
-
- if (authkey != null)
- xhr.setRequestHeader(authkey, authValue);
-
- xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
-
- xhr.onloadend = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- // window.console.log("parsing json result: " + xhr.responseText);
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
-
- if (result.code == 200)
- callback(result, null);
- else
- callback(null, result);
- }
-
- xhr.onerror = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
- callback(null, result);
- }
-
- xhr.send(requestBody);
- }
- }
-}
-
-PlayFab.AdminApi = {
- GetUserAccountInfo: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserAccountInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ResetUsers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ResetUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SendAccountRecoveryEmail: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SendAccountRecoveryEmail", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserTitleDisplayName: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserTitleDisplayName", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- DeleteUsers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/DeleteUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetDataReport: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetDataReport", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ResetUserStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ResetUserStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddNews: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/AddNews", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddVirtualCurrencyTypes: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/AddVirtualCurrencyTypes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCatalogItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetRandomResultTables: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetRandomResultTables", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetStoreItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetTitleData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ListVirtualCurrencyTypes: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ListVirtualCurrencyTypes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetCatalogItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetStoreItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetTitleData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetupPushNotification: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetupPushNotification", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCatalogItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateRandomResultTables: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateRandomResultTables", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateStoreItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddUserVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/AddUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserInventory: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetUserInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GrantItemsToUsers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GrantItemsToUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- RevokeInventoryItem: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/RevokeInventoryItem", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SubtractUserVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SubtractUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetMatchmakerGameInfo: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetMatchmakerGameInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetMatchmakerGameModes: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetMatchmakerGameModes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ModifyMatchmakerGameModes: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ModifyMatchmakerGameModes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddServerBuild: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/AddServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetServerBuildInfo: function (request, callback) {
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetServerBuildInfo", request, null, null, callback);
- },
-
- GetServerBuildUploadUrl: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetServerBuildUploadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ListServerBuilds: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ListServerBuilds", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ModifyServerBuild: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ModifyServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- RemoveServerBuild: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/RemoveServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCloudScriptRevision: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetCloudScriptRevision", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCloudScriptVersions: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetCloudScriptVersions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetPublishedRevision: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/SetPublishedRevision", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCloudScript: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/UpdateCloudScript", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- DeleteContent: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/DeleteContent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetContentList: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetContentList", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetContentUploadUrl: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/GetContentUploadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ResetCharacterStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Admin/ResetCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
-};
-
-var PlayFabAdminSDK = PlayFab.AdminApi;
diff --git a/PlayFabSDK/PlayFabClientApi.js b/PlayFabSDK/PlayFabClientApi.js
deleted file mode 100644
index e92b63f0..00000000
--- a/PlayFabSDK/PlayFabClientApi.js
+++ /dev/null
@@ -1,758 +0,0 @@
-var PlayFab = typeof PlayFab != 'undefined' ? PlayFab : {};
-
-if(!PlayFab.settings) {
- PlayFab.settings = {
- titleId: null,
- developerSecretKey: null // For security reasons you must never expose this value to the client or players
- }
-}
-
-if(!PlayFab._internalSettings) {
- PlayFab._internalSettings = {
- sessionTicket: null,
- sdkVersion: "0.3.151116",
- productionServerUrl: ".playfabapi.com",
- logicServerUrl: null,
-
- getServerUrl: function () {
- return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
- },
-
- getLogicServerUrl: function () {
- return PlayFab._internalSettings.logicServerUrl;
- },
-
- executeRequest: function (completeUrl, data, authkey, authValue, callback) {
- if (callback != null && typeof (callback) != "function") {
- throw "Callback must be null of a function";
- }
-
- if (data == null) {
- data = {};
- }
-
- var startTime = new Date();
-
- var requestBody = JSON.stringify(data);
-
- var xhr = new XMLHttpRequest();completeUrl
- // window.console.log("URL: " + completeUrl);
- xhr.open("POST", completeUrl, true);
-
- xhr.setRequestHeader('Content-Type', 'application/json');
-
- if (authkey != null)
- xhr.setRequestHeader(authkey, authValue);
-
- xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
-
- xhr.onloadend = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- // window.console.log("parsing json result: " + xhr.responseText);
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
-
- if (result.code == 200)
- callback(result, null);
- else
- callback(null, result);
- }
-
- xhr.onerror = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
- callback(null, result);
- }
-
- xhr.send(requestBody);
- }
- }
-}
-
-PlayFab.ClientApi = {
- GetPhotonAuthenticationToken: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPhotonAuthenticationToken", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LoginWithAndroidDeviceID: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithAndroidDeviceID", request, null, null, overloadCallback);
- },
-
- LoginWithCustomID: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithCustomID", request, null, null, overloadCallback);
- },
-
- LoginWithEmailAddress: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithEmailAddress", request, null, null, overloadCallback);
- },
-
- LoginWithFacebook: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithFacebook", request, null, null, overloadCallback);
- },
-
- LoginWithGoogleAccount: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithGoogleAccount", request, null, null, overloadCallback);
- },
-
- LoginWithIOSDeviceID: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithIOSDeviceID", request, null, null, overloadCallback);
- },
-
- LoginWithKongregate: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithKongregate", request, null, null, overloadCallback);
- },
-
- LoginWithPlayFab: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithPlayFab", request, null, null, overloadCallback);
- },
-
- LoginWithSteam: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LoginWithSteam", request, null, null, overloadCallback);
- },
-
- RegisterPlayFabUser: function (request, callback) {
- request.TitleId = PlayFab.settings.titleId != null ? PlayFab.settings.titleId : request.TitleId; if (request.TitleId == null) throw "Must be have PlayFab.settings.titleId set to call this method";
-
- var overloadCallback = function (result, error) {
- if (result != null && result.data.SessionTicket != null) { PlayFab._internalSettings.sessionTicket = result.data.SessionTicket; }
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RegisterPlayFabUser", request, null, null, overloadCallback);
- },
-
- AddUsernamePassword: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AddUsernamePassword", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetAccountInfo: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetAccountInfo", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPlayFabIDsFromFacebookIDs: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPlayFabIDsFromFacebookIDs", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPlayFabIDsFromGameCenterIDs: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPlayFabIDsFromGameCenterIDs", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPlayFabIDsFromGoogleIDs: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPlayFabIDsFromGoogleIDs", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPlayFabIDsFromSteamIDs: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPlayFabIDsFromSteamIDs", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserCombinedInfo: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserCombinedInfo", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkAndroidDeviceID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkAndroidDeviceID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkCustomID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkCustomID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkFacebookAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkFacebookAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkGameCenterAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkGameCenterAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkGoogleAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkGoogleAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkIOSDeviceID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkIOSDeviceID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkKongregate: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkKongregate", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LinkSteamAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LinkSteamAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- SendAccountRecoveryEmail: function (request, callback) {
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/SendAccountRecoveryEmail", request, null, null, callback);
- },
-
- UnlinkAndroidDeviceID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkAndroidDeviceID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkCustomID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkCustomID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkFacebookAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkFacebookAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkGameCenterAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkGameCenterAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkGoogleAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkGoogleAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkIOSDeviceID: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkIOSDeviceID", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkKongregate: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkKongregate", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlinkSteamAccount: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlinkSteamAccount", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateUserTitleDisplayName: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateUserTitleDisplayName", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetFriendLeaderboard: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetFriendLeaderboard", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetLeaderboard: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetLeaderboard", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetLeaderboardAroundCurrentUser: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetLeaderboardAroundCurrentUser", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserPublisherData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserPublisherData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserPublisherReadOnlyData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserPublisherReadOnlyData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserReadOnlyData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserReadOnlyData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserStatistics: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserStatistics", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateUserData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateUserData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateUserPublisherData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateUserPublisherData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateUserStatistics: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateUserStatistics", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCatalogItems: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCatalogItems", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetStoreItems: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetStoreItems", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetTitleData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetTitleData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetTitleNews: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetTitleNews", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- AddUserVirtualCurrency: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AddUserVirtualCurrency", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- ConfirmPurchase: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/ConfirmPurchase", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- ConsumeItem: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/ConsumeItem", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCharacterInventory: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCharacterInventory", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPurchase: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPurchase", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetUserInventory: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetUserInventory", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- PayForPurchase: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/PayForPurchase", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- PurchaseItem: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/PurchaseItem", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- RedeemCoupon: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RedeemCoupon", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- ReportPlayer: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/ReportPlayer", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- StartPurchase: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/StartPurchase", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- SubtractUserVirtualCurrency: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/SubtractUserVirtualCurrency", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UnlockContainerItem: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UnlockContainerItem", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- AddFriend: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AddFriend", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetFriendsList: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetFriendsList", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- RemoveFriend: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RemoveFriend", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- SetFriendTags: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/SetFriendTags", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- RegisterForIOSPushNotification: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RegisterForIOSPushNotification", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- RestoreIOSPurchases: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RestoreIOSPurchases", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- ValidateIOSReceipt: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/ValidateIOSReceipt", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCurrentGames: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCurrentGames", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetGameServerRegions: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetGameServerRegions", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- Matchmake: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/Matchmake", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- StartGame: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/StartGame", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- AndroidDevicePushNotificationRegistration: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AndroidDevicePushNotificationRegistration", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- ValidateGooglePlayPurchase: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/ValidateGooglePlayPurchase", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- LogEvent: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/LogEvent", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- AddSharedGroupMembers: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AddSharedGroupMembers", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- CreateSharedGroup: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/CreateSharedGroup", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPublisherData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPublisherData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetSharedGroupData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetSharedGroupData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- RemoveSharedGroupMembers: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/RemoveSharedGroupMembers", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateSharedGroupData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateSharedGroupData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCloudScriptUrl: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- var overloadCallback = function (result, error) {
- PlayFab._internalSettings.logicServerUrl = result.data.Url;
- if (callback != null && typeof (callback) == "function")
- callback(result, error);
- };
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCloudScriptUrl", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, overloadCallback);
- },
-
- RunCloudScript: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getLogicServerUrl() + "/Client/RunCloudScript", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetContentDownloadUrl: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetContentDownloadUrl", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetAllUsersCharacters: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetAllUsersCharacters", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCharacterLeaderboard: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCharacterLeaderboard", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetLeaderboardAroundCharacter: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetLeaderboardAroundCharacter", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetLeaderboardForUserCharacters: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetLeaderboardForUserCharacters", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GrantCharacterToUser: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GrantCharacterToUser", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCharacterData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCharacterData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetCharacterReadOnlyData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetCharacterReadOnlyData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- UpdateCharacterData: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/UpdateCharacterData", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- AcceptTrade: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/AcceptTrade", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- CancelTrade: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/CancelTrade", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetPlayerTrades: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetPlayerTrades", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- GetTradeStatus: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/GetTradeStatus", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
- OpenTrade: function (request, callback) {
- if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Client/OpenTrade", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
- },
-
-};
-
-var PlayFabClientSDK = PlayFab.ClientApi;
diff --git a/PlayFabSDK/PlayFabMatchmakerApi.js b/PlayFabSDK/PlayFabMatchmakerApi.js
deleted file mode 100644
index 232822a3..00000000
--- a/PlayFabSDK/PlayFabMatchmakerApi.js
+++ /dev/null
@@ -1,134 +0,0 @@
-var PlayFab = typeof PlayFab != 'undefined' ? PlayFab : {};
-
-if(!PlayFab.settings) {
- PlayFab.settings = {
- titleId: null,
- developerSecretKey: null // For security reasons you must never expose this value to the client or players
- }
-}
-
-if(!PlayFab._internalSettings) {
- PlayFab._internalSettings = {
- sessionTicket: null,
- sdkVersion: "0.3.151116",
- productionServerUrl: ".playfabapi.com",
- logicServerUrl: null,
-
- getServerUrl: function () {
- return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
- },
-
- getLogicServerUrl: function () {
- return PlayFab._internalSettings.logicServerUrl;
- },
-
- executeRequest: function (completeUrl, data, authkey, authValue, callback) {
- if (callback != null && typeof (callback) != "function") {
- throw "Callback must be null of a function";
- }
-
- if (data == null) {
- data = {};
- }
-
- var startTime = new Date();
-
- var requestBody = JSON.stringify(data);
-
- var xhr = new XMLHttpRequest();completeUrl
- // window.console.log("URL: " + completeUrl);
- xhr.open("POST", completeUrl, true);
-
- xhr.setRequestHeader('Content-Type', 'application/json');
-
- if (authkey != null)
- xhr.setRequestHeader(authkey, authValue);
-
- xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
-
- xhr.onloadend = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- // window.console.log("parsing json result: " + xhr.responseText);
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
-
- if (result.code == 200)
- callback(result, null);
- else
- callback(null, result);
- }
-
- xhr.onerror = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
- callback(null, result);
- }
-
- xhr.send(requestBody);
- }
- }
-}
-
-PlayFab.MatchmakerApi = {
- AuthUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Matchmaker/AuthUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- PlayerJoined: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Matchmaker/PlayerJoined", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- PlayerLeft: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Matchmaker/PlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- StartGame: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Matchmaker/StartGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UserInfo: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Matchmaker/UserInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
-};
-
-var PlayFabMatchmakerSDK = PlayFab.MatchmakerApi;
diff --git a/PlayFabSDK/PlayFabServerApi.js b/PlayFabSDK/PlayFabServerApi.js
deleted file mode 100644
index b115574a..00000000
--- a/PlayFabSDK/PlayFabServerApi.js
+++ /dev/null
@@ -1,518 +0,0 @@
-var PlayFab = typeof PlayFab != 'undefined' ? PlayFab : {};
-
-if(!PlayFab.settings) {
- PlayFab.settings = {
- titleId: null,
- developerSecretKey: null // For security reasons you must never expose this value to the client or players
- }
-}
-
-if(!PlayFab._internalSettings) {
- PlayFab._internalSettings = {
- sessionTicket: null,
- sdkVersion: "0.3.151116",
- productionServerUrl: ".playfabapi.com",
- logicServerUrl: null,
-
- getServerUrl: function () {
- return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
- },
-
- getLogicServerUrl: function () {
- return PlayFab._internalSettings.logicServerUrl;
- },
-
- executeRequest: function (completeUrl, data, authkey, authValue, callback) {
- if (callback != null && typeof (callback) != "function") {
- throw "Callback must be null of a function";
- }
-
- if (data == null) {
- data = {};
- }
-
- var startTime = new Date();
-
- var requestBody = JSON.stringify(data);
-
- var xhr = new XMLHttpRequest();completeUrl
- // window.console.log("URL: " + completeUrl);
- xhr.open("POST", completeUrl, true);
-
- xhr.setRequestHeader('Content-Type', 'application/json');
-
- if (authkey != null)
- xhr.setRequestHeader(authkey, authValue);
-
- xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
-
- xhr.onloadend = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- // window.console.log("parsing json result: " + xhr.responseText);
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
-
- if (result.code == 200)
- callback(result, null);
- else
- callback(null, result);
- }
-
- xhr.onerror = function () {
- if (callback == null)
- return;
-
- var result = null;
- try {
- result = JSON.parse(xhr.responseText);
- } catch (e) {
- result = {
- code: 503, // Service Unavailable
- status: "Service Unavailable",
- error: "Connection error",
- errorCode: 2, // PlayFabErrorCode.ConnectionError
- errorMessage: xhr.responseText
- };
- }
-
- result.CallBackTimeMS = new Date() - startTime;
- callback(null, result);
- }
-
- xhr.send(requestBody);
- }
- }
-}
-
-PlayFab.ServerApi = {
- AuthenticateSessionTicket: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/AuthenticateSessionTicket", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetPlayFabIDsFromFacebookIDs: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetPlayFabIDsFromFacebookIDs", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserAccountInfo: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserAccountInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SendPushNotification: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SendPushNotification", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetLeaderboard: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetLeaderboard", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetLeaderboardAroundUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetLeaderboardAroundUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserPublisherReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserPublisherReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCatalogItems: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetTitleData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetTitleInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetTitleNews: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetTitleNews", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetTitleData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetTitleInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddCharacterVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/AddCharacterVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddUserVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/AddUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterInventory: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetUserInventory: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetUserInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GrantItemsToCharacter: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GrantItemsToCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GrantItemsToUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GrantItemsToUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GrantItemsToUsers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GrantItemsToUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ModifyItemUses: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/ModifyItemUses", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- MoveItemToCharacterFromCharacter: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/MoveItemToCharacterFromCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- MoveItemToCharacterFromUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/MoveItemToCharacterFromUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- MoveItemToUserFromCharacter: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/MoveItemToUserFromCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- RedeemCoupon: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/RedeemCoupon", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- ReportPlayer: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/ReportPlayer", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SubtractCharacterVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SubtractCharacterVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SubtractUserVirtualCurrency: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SubtractUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateUserInventoryItemCustomData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateUserInventoryItemCustomData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- NotifyMatchmakerPlayerLeft: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/NotifyMatchmakerPlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- RedeemMatchmakerTicket: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/RedeemMatchmakerTicket", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AwardSteamAchievement: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/AwardSteamAchievement", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- LogEvent: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/LogEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- AddSharedGroupMembers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/AddSharedGroupMembers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- CreateSharedGroup: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/CreateSharedGroup", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- DeleteSharedGroup: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/DeleteSharedGroup", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetSharedGroupData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetSharedGroupData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- RemoveSharedGroupMembers: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/RemoveSharedGroupMembers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- SetPublisherData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/SetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateSharedGroupData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateSharedGroupData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetContentDownloadUrl: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetContentDownloadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- DeleteCharacterFromUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/DeleteCharacterFromUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetAllUsersCharacters: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetAllUsersCharacters", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterLeaderboard: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterLeaderboard", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetLeaderboardAroundCharacter: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetLeaderboardAroundCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetLeaderboardForUserCharacters: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetLeaderboardForUserCharacters", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GrantCharacterToUser: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GrantCharacterToUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCharacterStatistics: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- GetCharacterReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/GetCharacterReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCharacterData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateCharacterData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCharacterInternalData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateCharacterInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
- UpdateCharacterReadOnlyData: function (request, callback) {
- if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
-
- PlayFab._internalSettings.executeRequest(PlayFab._internalSettings.getServerUrl() + "/Server/UpdateCharacterReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
- },
-
-};
-
-var PlayFabServerSDK = PlayFab.ServerApi;
diff --git a/PlayFabSdk/package.json b/PlayFabSdk/package.json
new file mode 100644
index 00000000..b104c0fb
--- /dev/null
+++ b/PlayFabSdk/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "playfab-web-sdk",
+ "version": "1.217.260605",
+ "description": "Playfab SDK for JS client applications",
+ "license": "Apache-2.0",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/playfab/JavaScriptSDK"
+ }
+}
diff --git a/PlayFabSdk/readme.md b/PlayFabSdk/readme.md
new file mode 100644
index 00000000..113deb94
--- /dev/null
+++ b/PlayFabSdk/readme.md
@@ -0,0 +1,65 @@
+# JavaScriptSDK README
+
+
+## 1. Overview:
+
+JavaScriptSDK for the Client API of PlayFab
+
+This SDK can alternatively be used via our CDN. Additional details can be found [here](https://blog.playfab.com/blog/playfab-now-serving-javascript-sdk-via-cdn).
+
+If you want to start coding right away, check out our [JavaScript Getting Started Guide](JavaScriptGettingStarted.md)
+
+
+## 2. Prerequisites:
+
+* Users should be very familiar with the topics covered in our [getting started guide](https://api.playfab.com/docs/general-getting-started).
+
+To connect to the PlayFab service, your machine must be running TLS v1.2 or better.
+* For Windows, this means Windows 7 and above
+* [Official Microsoft Documentation](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380516%28v=vs.85%29.aspx)
+* [Support for SSL/TLS protocols on Windows](http://blogs.msdn.com/b/kaushal/archive/2011/10/02/support-for-ssl-tls-protocols-on-windows.aspx)
+
+
+## 3. Example Project (UNDER CONSTRUCTION)
+
+The Example project is being revised for the upcoming 1.0 release
+
+This sdk includes an optional example project that is used by PlayFab to verify sdk features are fully functional.
+
+Please read about the testTitleData.json format, and purpose here:
+* [testTitleData.md](https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/testTitleData.md) must be created and placed in the root of the example (beside index.html & PlayFabApiTest.ts), and must be named "testTitleData.json"
+
+
+## 4. Troubleshooting:
+
+For a complete list of available APIs, check out the [online documentation](http://api.playfab.com/Documentation/).
+
+#### Contact Us
+We love to hear from our developer community!
+Do you have ideas on how we can make our products and services better?
+
+Our Developer Success Team can assist with answering any questions as well as process any feedback you have about PlayFab services.
+
+[Forums, Support and Knowledge Base](https://community.playfab.com/index.html)
+
+## 7. NPM support:
+You may install JavaScript SDK with npm by running :
+
+`npm install playfab-web-sdk`
+
+Notice that it will install web JavaScript package as opposed to `npm install playfab` which will install NodeJS SDK.
+
+While npm is generally used for server side packages, you may use one of popular build tools to mix NPM installed packages into your clientside JS codebase. Consider Babel, Webpack, Gulp or Grunt for different approaches to building and automation.
+
+## 6. Acknowledgements
+
+ [dylanh724](https://www.github.com/dylanh724) - The previous tutorial before the current [Getting Started Guide](JavaScriptGettingStarted.md)
+
+
+## 7. Copyright and Licensing Information:
+
+ Apache License --
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ Full details available within the LICENSE file.
\ No newline at end of file
diff --git a/PlayFabSdk/src/PlayFab/PlayFabAddonApi.js b/PlayFabSdk/src/PlayFab/PlayFabAddonApi.js
new file mode 100644
index 00000000..0680fa3e
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabAddonApi.js
@@ -0,0 +1,367 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.AddonApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ CreateOrUpdateApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateApple", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateFacebook: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateFacebook", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateFacebookInstantGames: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateFacebookInstantGames", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateGoogle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateGoogle", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateKongregate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateKongregate", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateNintendo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateNintendo", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdatePSN: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdatePSN", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateSteam: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateSteam", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateToxMod: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateToxMod", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateOrUpdateTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/CreateOrUpdateTwitch", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteApple", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteFacebook: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteFacebook", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteFacebookInstantGames: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteFacebookInstantGames", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteGoogle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteGoogle", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteKongregate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteKongregate", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteNintendo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteNintendo", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeletePSN: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeletePSN", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteSteam: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteSteam", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteToxMod: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteToxMod", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/DeleteTwitch", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetApple", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetFacebook: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetFacebook", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetFacebookInstantGames: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetFacebookInstantGames", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetGoogle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetGoogle", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetKongregate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetKongregate", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetNintendo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetNintendo", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetPSN: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetPSN", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetSteam: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetSteam", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetToxMod: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetToxMod", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Addon/GetTwitch", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabAddonSDK = PlayFab.AddonApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabAdminApi.js b/PlayFabSdk/src/PlayFab/PlayFabAdminApi.js
new file mode 100644
index 00000000..5b4f9aef
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabAdminApi.js
@@ -0,0 +1,719 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.AdminApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AbortTaskInstance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AbortTaskInstance", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddLocalizedNews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AddLocalizedNews", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddNews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AddNews", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddPlayerTag: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AddPlayerTag", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AddUserVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddVirtualCurrencyTypes: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/AddVirtualCurrencyTypes", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ BanUsers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/BanUsers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CheckLimitedEditionItemAvailability: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CheckLimitedEditionItemAvailability", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateActionsOnPlayersInSegmentTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreateActionsOnPlayersInSegmentTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateCloudScriptTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreateCloudScriptTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateInsightsScheduledScalingTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreateInsightsScheduledScalingTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateOpenIdConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreateOpenIdConnection", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreatePlayerSharedSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreatePlayerSharedSecret", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreatePlayerStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateSegment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/CreateSegment", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteContent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteContent", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteMasterPlayerAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteMasterPlayerAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteMasterPlayerEventData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteMasterPlayerEventData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteMembershipSubscription: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteMembershipSubscription", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteOpenIdConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteOpenIdConnection", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeletePlayer", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeletePlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePlayerSharedSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeletePlayerSharedSecret", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteSegment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteSegment", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteStore: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteStore", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteTitle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteTitle", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteTitleDataOverride: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/DeleteTitleDataOverride", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ExportMasterPlayerData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ExportMasterPlayerData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ExportPlayersInSegment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ExportPlayersInSegment", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetActionsOnPlayersInSegmentTaskInstance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetAllSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetAllSegments", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCatalogItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetCatalogItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCloudScriptRevision: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetCloudScriptRevision", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCloudScriptTaskInstance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetCloudScriptTaskInstance", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCloudScriptVersions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetCloudScriptVersions", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetContentList: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetContentList", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetContentUploadUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetContentUploadUrl", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetDataReport: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetDataReport", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayedTitleList: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayedTitleList", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerCustomProperty: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerCustomProperty", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerIdFromAuthToken: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerIdFromAuthToken", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerProfile: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerProfile", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerSegments", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerSharedSecrets: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerSharedSecrets", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatisticDefinitions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatisticVersions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPlayerTags", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPolicy", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetRandomResultTables: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetRandomResultTables", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSegmentExport: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetSegmentExport", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSegmentPlayerCount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetSegmentPlayerCount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetSegments", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetStoreItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetStoreItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTaskInstances: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetTaskInstances", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTasks: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetTasks", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTitleData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetTitleData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTitleInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetTitleInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserAccountInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserAccountInfo", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserInventory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserInventory", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserPublisherInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserPublisherReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GetUserReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GrantItemsToUsers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/GrantItemsToUsers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ IncrementLimitedEditionItemAvailability: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/IncrementLimitedEditionItemAvailability", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ IncrementPlayerStatisticVersion: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ListOpenIdConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ListOpenIdConnection", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ListPlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ListPlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ListVirtualCurrencyTypes: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ListVirtualCurrencyTypes", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RefundPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RefundPurchase", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemovePlayerTag: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RemovePlayerTag", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemoveVirtualCurrencyTypes: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RemoveVirtualCurrencyTypes", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ResetCharacterStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ResetCharacterStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ResetPassword: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ResetPassword", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ResetUserStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ResetUserStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ResolvePurchaseDispute: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ResolvePurchaseDispute", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeAllBansForUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RevokeAllBansForUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RevokeBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeInventoryItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RevokeInventoryItem", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RevokeInventoryItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RunTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/RunTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SendAccountRecoveryEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SendAccountRecoveryEmail", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetCatalogItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetCatalogItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetMembershipOverride: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetMembershipOverride", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetPlayerSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetPlayerSecret", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetPublishedRevision: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetPublishedRevision", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetStoreItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetStoreItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetTitleData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetTitleData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetTitleDataAndOverrides: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetTitleDataAndOverrides", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetTitleInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetTitleInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetupPushNotification: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SetupPushNotification", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SubtractUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/SubtractUserVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCatalogItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateCatalogItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCloudScript: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateCloudScript", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateOpenIdConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateOpenIdConnection", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdatePlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerSharedSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdatePlayerSharedSecret", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdatePolicy", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateRandomResultTables: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateRandomResultTables", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateSegment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateSegment", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateStoreItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateStoreItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateTask", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserPublisherInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserTitleDisplayName: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/UpdateUserTitleDisplayName", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ValidateApiPolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Admin/ValidateApiPolicy", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabAdminSDK = PlayFab.AdminApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabAuthenticationApi.js b/PlayFabSdk/src/PlayFab/PlayFabAuthenticationApi.js
new file mode 100644
index 00000000..9ec5b672
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabAuthenticationApi.js
@@ -0,0 +1,278 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.AuthenticationApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AuthenticateGameServerWithCustomId: function (request, callback, customData, extraHeaders) {
+ var overloadCallback = function (result, error) {
+ if (result != null && result.data.EntityToken != null && result.data.EntityToken.EntityToken != null)
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, "X-EntityToken", overloadCallback, customData, extraHeaders);
+ },
+
+ Delete: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/GameServerIdentity/Delete", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetEntityToken: function (request, callback, customData, extraHeaders) {
+ var authKey = null; var authValue = null;
+ if (!authKey && PlayFab._internalSettings.sessionTicket) { var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey="X-Authorization"); authKey = authInfo.authKey, authValue = authInfo.authValue; }
+ if (!authKey && PlayFab.settings.developerSecretKey) { var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey="X-SecretKey"); authKey = authInfo.authKey, authValue = authInfo.authValue; }
+ var overloadCallback = function (result, error) {
+ if (result != null && result.data.EntityToken != null)
+ PlayFab._internalSettings.entityToken = result.data.EntityToken;
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Authentication/GetEntityToken", request, authKey, overloadCallback, customData, extraHeaders);
+ },
+
+ ValidateEntityToken: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Authentication/ValidateEntityToken", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabAuthenticationSDK = PlayFab.AuthenticationApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabClientApi.js b/PlayFabSdk/src/PlayFab/PlayFabClientApi.js
new file mode 100644
index 00000000..d079ce97
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabClientApi.js
@@ -0,0 +1,1380 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.ClientApi = {
+
+ IsClientLoggedIn: function () {
+ return PlayFab._internalSettings.sessionTicket != null && PlayFab._internalSettings.sessionTicket.length > 0;
+ },
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AcceptTrade: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AcceptTrade", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddFriend: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddFriend", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddGenericID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddGenericID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddOrUpdateContactEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddOrUpdateContactEmail", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddSharedGroupMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddSharedGroupMembers", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddUsernamePassword: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddUsernamePassword", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AddUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AddUserVirtualCurrency", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AndroidDevicePushNotificationRegistration: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AndroidDevicePushNotificationRegistration", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ AttributeInstall: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/AttributeInstall", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ CancelTrade: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/CancelTrade", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConfirmPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConfirmPurchase", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConsumeItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConsumeItem", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConsumeMicrosoftStoreEntitlements: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConsumeMicrosoftStoreEntitlements", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConsumePS5Entitlements: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConsumePS5Entitlements", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConsumePSNEntitlements: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConsumePSNEntitlements", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ConsumeXboxEntitlements: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ConsumeXboxEntitlements", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ CreateSharedGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/CreateSharedGroup", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ DeletePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/DeletePlayerCustomProperties", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ExecuteCloudScript: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ExecuteCloudScript", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetAccountInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetAccountInfo", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetAdPlacements: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetAdPlacements", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetAllUsersCharacters: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetAllUsersCharacters", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCatalogItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCatalogItems", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCharacterData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCharacterData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCharacterInventory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCharacterInventory", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCharacterLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCharacterLeaderboard", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCharacterReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCharacterReadOnlyData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetCharacterStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetCharacterStatistics", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetContentDownloadUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetContentDownloadUrl", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetFriendLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetFriendLeaderboard", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetFriendLeaderboardAroundPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetFriendLeaderboardAroundPlayer", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetFriendsList: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetFriendsList", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetLeaderboard", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardAroundCharacter: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetLeaderboardAroundCharacter", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardAroundPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetLeaderboardAroundPlayer", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardForUserCharacters: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetLeaderboardForUserCharacters", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPaymentToken: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPaymentToken", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPhotonAuthenticationToken: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPhotonAuthenticationToken", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerCombinedInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerCombinedInfo", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerCustomProperty: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerCustomProperty", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerProfile: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerProfile", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerSegments", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerStatistics", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatisticVersions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerStatisticVersions", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerTags", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayerTrades: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayerTrades", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromBattleNetAccountIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromBattleNetAccountIds", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromFacebookIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromFacebookIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromFacebookInstantGamesIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromFacebookInstantGamesIds", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromGameCenterIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromGameCenterIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromGenericIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromGenericIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromGoogleIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromGoogleIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromGooglePlayGamesPlayerIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromGooglePlayGamesPlayerIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromKongregateIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromKongregateIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromNintendoServiceAccountIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromNintendoServiceAccountIds", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromNintendoSwitchDeviceIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromOpenIdSubjectIdentifiers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromOpenIdSubjectIdentifiers", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromPSNAccountIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromPSNAccountIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromPSNOnlineIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromPSNOnlineIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromSteamIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromSteamIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromSteamNames: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromSteamNames", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromTwitchIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromTwitchIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromXboxLiveIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPlayFabIDsFromXboxLiveIDs", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPublisherData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetPurchase", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetSharedGroupData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetSharedGroupData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetStoreItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetStoreItems", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetTime: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetTime", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetTitleData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetTitleData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetTitleNews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetTitleNews", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetTitlePublicKey: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetTitlePublicKey", request, null, callback, customData, extraHeaders);
+ },
+
+ GetTradeStatus: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetTradeStatus", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetUserData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetUserInventory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetUserInventory", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetUserPublisherData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetUserPublisherReadOnlyData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GetUserReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GetUserReadOnlyData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ GrantCharacterToUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/GrantCharacterToUser", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkAndroidDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkAndroidDeviceID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkApple", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkBattleNetAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkBattleNetAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkCustomID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkCustomID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkFacebookAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkFacebookAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkFacebookInstantGamesId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkFacebookInstantGamesId", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkGameCenterAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkGameCenterAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkGoogleAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkGoogleAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkGooglePlayGamesServicesAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkGooglePlayGamesServicesAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkIOSDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkIOSDeviceID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkKongregate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkKongregate", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkNintendoServiceAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkNintendoServiceAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkNintendoSwitchDeviceId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkNintendoSwitchDeviceId", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkOpenIdConnect: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkOpenIdConnect", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkPSNAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkPSNAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkSteamAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkSteamAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkTwitch", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LinkXboxAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LinkXboxAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ListPlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ListPlayerCustomProperties", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ LoginWithAndroidDeviceID: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithAndroidDeviceID", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithApple: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithApple", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithBattleNet: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithBattleNet", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithCustomID: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithCustomID", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithEmailAddress: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithEmailAddress", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithFacebook: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithFacebook", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithFacebookInstantGamesId: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithFacebookInstantGamesId", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithGameCenter: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithGameCenter", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithGoogleAccount: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithGoogleAccount", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithGooglePlayGamesServices: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithGooglePlayGamesServices", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithIOSDeviceID: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithIOSDeviceID", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithKongregate: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithKongregate", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithNintendoServiceAccount: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithNintendoServiceAccount", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithNintendoSwitchDeviceId: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithNintendoSwitchDeviceId", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithOpenIdConnect: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithOpenIdConnect", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithPlayFab: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithPlayFab", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithPSN: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithPSN", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithSteam: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithSteam", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithTwitch: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithTwitch", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ LoginWithXbox: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ PlayFab._internalSettings.ExecuteRequestWrapper("/Client/LoginWithXbox", request, null, overloadCallback, customData, extraHeaders);
+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
+ return new Promise(function(resolve){resolve(authenticationContext);});
+ },
+
+ OpenTrade: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/OpenTrade", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ PayForPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/PayForPurchase", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ PurchaseItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/PurchaseItem", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RedeemCoupon: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RedeemCoupon", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RefreshPSNAuthToken: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RefreshPSNAuthToken", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RegisterForIOSPushNotification: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RegisterForIOSPushNotification", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RegisterPlayFabUser: function (request, callback, customData, extraHeaders) {
+ request.TitleId = PlayFab.settings.titleId ? PlayFab.settings.titleId : request.TitleId; if (!request.TitleId) throw PlayFab._internalSettings.errorTitleId;
+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
+ // Deep-copy the authenticationContext here to safely update it
+ var authenticationContext = JSON.parse(JSON.stringify(PlayFab._internalSettings.authenticationContext));
+ var overloadCallback = function (result, error) {
+ if (result != null) {
+ if(result.data.SessionTicket != null) {
+ PlayFab._internalSettings.sessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken != null) {
+ PlayFab._internalSettings.entityToken = result.data.EntityToken.EntityToken;
+ }
+ // Apply the updates for the AuthenticationContext returned to the client
+ authenticationContext = PlayFab._internalSettings.UpdateAuthenticationContext(authenticationContext, result);
+ }
+ if (callback != null && typeof (callback) === "function")
+ callback(result, error);
+ };
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RegisterPlayFabUser", request, null, overloadCallback, customData, extraHeaders);
+ },
+
+ RemoveContactEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RemoveContactEmail", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RemoveFriend: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RemoveFriend", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RemoveGenericID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RemoveGenericID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RemoveSharedGroupMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RemoveSharedGroupMembers", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ReportAdActivity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ReportAdActivity", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ReportDeviceInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ReportDeviceInfo", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ReportPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ReportPlayer", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RestoreIOSPurchases: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RestoreIOSPurchases", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ RewardAdActivity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/RewardAdActivity", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ SendAccountRecoveryEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/SendAccountRecoveryEmail", request, null, callback, customData, extraHeaders);
+ },
+
+ SetFriendTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/SetFriendTags", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ SetPlayerSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/SetPlayerSecret", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ StartPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/StartPurchase", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ SubtractUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/SubtractUserVirtualCurrency", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkAndroidDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkAndroidDeviceID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkApple", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkBattleNetAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkBattleNetAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkCustomID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkCustomID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkFacebookAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkFacebookAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkFacebookInstantGamesId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkFacebookInstantGamesId", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkGameCenterAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkGameCenterAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkGoogleAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkGoogleAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkGooglePlayGamesServicesAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkGooglePlayGamesServicesAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkIOSDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkIOSDeviceID", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkKongregate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkKongregate", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkNintendoServiceAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkNintendoServiceAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkNintendoSwitchDeviceId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkNintendoSwitchDeviceId", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkOpenIdConnect: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkOpenIdConnect", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkPSNAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkPSNAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkSteamAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkSteamAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkTwitch", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlinkXboxAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlinkXboxAccount", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlockContainerInstance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlockContainerInstance", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UnlockContainerItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UnlockContainerItem", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateAvatarUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateAvatarUrl", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateCharacterData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateCharacterStatistics", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdatePlayerCustomProperties", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdatePlayerStatistics", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateSharedGroupData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateSharedGroupData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateUserData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateUserPublisherData", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ UpdateUserTitleDisplayName: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/UpdateUserTitleDisplayName", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ValidateAmazonIAPReceipt: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ValidateAmazonIAPReceipt", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ValidateGooglePlayPurchase: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ValidateGooglePlayPurchase", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ValidateIOSReceipt: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ValidateIOSReceipt", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ ValidateWindowsStoreReceipt: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/ValidateWindowsStoreReceipt", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ WriteCharacterEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/WriteCharacterEvent", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ WritePlayerEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/WritePlayerEvent", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+ WriteTitleEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Client/WriteTitleEvent", request, "X-Authorization", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabClientSDK = PlayFab.ClientApi;
+
+PlayFab.RegisterWithPhaser = function() {
+ if ( typeof Phaser === "undefined" || typeof Phaser.Plugin === "undefined" )
+ return;
+
+ Phaser.Plugin.PlayFab = function (game, parent) {
+ Phaser.Plugin.call(this, game, parent);
+ };
+ Phaser.Plugin.PlayFab.prototype = Object.create(Phaser.Plugin.prototype);
+ Phaser.Plugin.PlayFab.prototype.constructor = Phaser.Plugin.PlayFab;
+ Phaser.Plugin.PlayFab.prototype.PlayFab = PlayFab;
+ Phaser.Plugin.PlayFab.prototype.settings = PlayFab.settings;
+ Phaser.Plugin.PlayFab.prototype.ClientApi = PlayFab.ClientApi;
+};
+PlayFab.RegisterWithPhaser();
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabCloudScriptApi.js b/PlayFabSdk/src/PlayFab/PlayFabCloudScriptApi.js
new file mode 100644
index 00000000..950a2bf7
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabCloudScriptApi.js
@@ -0,0 +1,307 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.CloudScriptApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ ExecuteEntityCloudScript: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ExecuteEntityCloudScript", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ExecuteFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ExecuteFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/GetFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListEventHubFunctions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ListEventHubFunctions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListFunctions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ListFunctions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListHttpFunctions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ListHttpFunctions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListQueuedFunctions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/ListQueuedFunctions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PostFunctionResultForEntityTriggeredAction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/PostFunctionResultForEntityTriggeredAction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PostFunctionResultForFunctionExecution: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/PostFunctionResultForFunctionExecution", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PostFunctionResultForPlayerTriggeredAction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/PostFunctionResultForPlayerTriggeredAction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PostFunctionResultForScheduledTask: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/PostFunctionResultForScheduledTask", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RegisterEventHubFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/RegisterEventHubFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RegisterHttpFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/RegisterHttpFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RegisterQueuedFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/RegisterQueuedFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnregisterFunction: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/CloudScript/UnregisterFunction", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabCloudScriptSDK = PlayFab.CloudScriptApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabDataApi.js b/PlayFabSdk/src/PlayFab/PlayFabDataApi.js
new file mode 100644
index 00000000..9b7aebbc
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabDataApi.js
@@ -0,0 +1,275 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.DataApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AbortFileUploads: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/File/AbortFileUploads", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteFiles: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/File/DeleteFiles", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ FinalizeFileUploads: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/File/FinalizeFileUploads", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetFiles: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/File/GetFiles", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetObjects: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Object/GetObjects", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ InitiateFileUploads: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/File/InitiateFileUploads", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetObjects: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Object/SetObjects", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabDataSDK = PlayFab.DataApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabEconomyApi.js b/PlayFabSdk/src/PlayFab/PlayFabEconomyApi.js
new file mode 100644
index 00000000..f0d972c4
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabEconomyApi.js
@@ -0,0 +1,431 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.EconomyApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AddInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/AddInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateDraftItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/CreateDraftItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateUploadUrls: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/CreateUploadUrls", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteEntityItemReviews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/DeleteEntityItemReviews", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteInventoryCollection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/DeleteInventoryCollection", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/DeleteInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/DeleteItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ExecuteInventoryOperations: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/ExecuteInventoryOperations", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ExecuteTransferOperations: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/ExecuteTransferOperations", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetCatalogConfig: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetCatalogConfig", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetDraftItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetDraftItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetDraftItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetDraftItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetEntityDraftItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetEntityDraftItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetEntityItemReview: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetEntityItemReview", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetInventoryCollectionIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/GetInventoryCollectionIds", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/GetInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetInventoryOperationStatus: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/GetInventoryOperationStatus", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItemContainers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItemContainers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItemModerationState: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItemModerationState", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItemPublishStatus: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItemPublishStatus", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItemReviews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItemReviews", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItemReviewSummary: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItemReviewSummary", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/GetItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTransactionHistory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/GetTransactionHistory", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PublishDraftItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/PublishDraftItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ PurchaseInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/PurchaseInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemAppleAppStoreInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemAppleAppStoreInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemAppleAppStoreWithJwsInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemAppleAppStoreWithJwsInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemGooglePlayInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemGooglePlayInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemMicrosoftStoreInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemMicrosoftStoreInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemNintendoEShopInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemNintendoEShopInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemPlayStationStoreInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemPlayStationStoreInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RedeemSteamInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/RedeemSteamInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ReportItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/ReportItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ReportItemReview: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/ReportItemReview", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ReviewItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/ReviewItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SearchItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/SearchItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetItemModerationState: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/SetItemModerationState", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SubmitItemReviewVote: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/SubmitItemReviewVote", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SubtractInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/SubtractInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ TakedownItemReviews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/TakedownItemReviews", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ TransferInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/TransferInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateCatalogConfig: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/UpdateCatalogConfig", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateDraftItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Catalog/UpdateDraftItem", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Inventory/UpdateInventoryItems", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabEconomySDK = PlayFab.EconomyApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabEventsApi.js b/PlayFabSdk/src/PlayFab/PlayFabEventsApi.js
new file mode 100644
index 00000000..3e2f69e6
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabEventsApi.js
@@ -0,0 +1,295 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.EventsApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ CreateTelemetryKey: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/CreateTelemetryKey", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteDataConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/DeleteDataConnection", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteTelemetryKey: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/DeleteTelemetryKey", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetDataConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/GetDataConnection", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTelemetryKey: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/GetTelemetryKey", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListDataConnections: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/ListDataConnections", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListTelemetryKeys: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/ListTelemetryKeys", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetDataConnection: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/SetDataConnection", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetDataConnectionActive: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/SetDataConnectionActive", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetTelemetryKeyActive: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/SetTelemetryKeyActive", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ WriteEvents: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/WriteEvents", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ WriteTelemetryEvents: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Event/WriteTelemetryEvents", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabEventsSDK = PlayFab.EventsApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabExperimentationApi.js b/PlayFabSdk/src/PlayFab/PlayFabExperimentationApi.js
new file mode 100644
index 00000000..83c1e8f5
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabExperimentationApi.js
@@ -0,0 +1,299 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.ExperimentationApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ CreateExclusionGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/CreateExclusionGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateExperiment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/CreateExperiment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteExclusionGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/DeleteExclusionGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteExperiment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/DeleteExperiment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetExclusionGroups: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/GetExclusionGroups", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetExclusionGroupTraffic: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/GetExclusionGroupTraffic", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetExperiments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/GetExperiments", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLatestScorecard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/GetLatestScorecard", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTreatmentAssignment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/GetTreatmentAssignment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ StartExperiment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/StartExperiment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ StopExperiment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/StopExperiment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateExclusionGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/UpdateExclusionGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateExperiment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Experimentation/UpdateExperiment", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabExperimentationSDK = PlayFab.ExperimentationApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabGroupsApi.js b/PlayFabSdk/src/PlayFab/PlayFabGroupsApi.js
new file mode 100644
index 00000000..a7bc069a
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabGroupsApi.js
@@ -0,0 +1,347 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.GroupsApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AcceptGroupApplication: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/AcceptGroupApplication", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ AcceptGroupInvitation: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/AcceptGroupInvitation", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ AddMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/AddMembers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ApplyToGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ApplyToGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ BlockEntity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/BlockEntity", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ChangeMemberRole: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ChangeMemberRole", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/CreateGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateRole: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/CreateRole", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/DeleteGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteRole: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/DeleteRole", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/GetGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ InviteToGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/InviteToGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ IsMember: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/IsMember", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListGroupApplications: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListGroupApplications", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListGroupBlocks: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListGroupBlocks", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListGroupInvitations: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListGroupInvitations", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListGroupMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListGroupMembers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListMembership: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListMembership", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListMembershipOpportunities: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/ListMembershipOpportunities", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RemoveGroupApplication: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/RemoveGroupApplication", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RemoveGroupInvitation: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/RemoveGroupInvitation", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RemoveMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/RemoveMembers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnblockEntity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/UnblockEntity", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/UpdateGroup", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateRole: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Group/UpdateRole", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabGroupsSDK = PlayFab.GroupsApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabInsightsApi.js b/PlayFabSdk/src/PlayFab/PlayFabInsightsApi.js
new file mode 100644
index 00000000..82e192c3
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabInsightsApi.js
@@ -0,0 +1,271 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.InsightsApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ GetDetails: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/GetDetails", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLimits: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/GetLimits", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetOperationStatus: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/GetOperationStatus", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetPendingOperations: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/GetPendingOperations", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetPerformance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/SetPerformance", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetStorageRetention: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Insights/SetStorageRetention", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabInsightsSDK = PlayFab.InsightsApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabLocalizationApi.js b/PlayFabSdk/src/PlayFab/PlayFabLocalizationApi.js
new file mode 100644
index 00000000..4d6e370f
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabLocalizationApi.js
@@ -0,0 +1,251 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.LocalizationApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ GetLanguageList: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Locale/GetLanguageList", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabLocalizationSDK = PlayFab.LocalizationApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabMultiplayerApi.js b/PlayFabSdk/src/PlayFab/PlayFabMultiplayerApi.js
new file mode 100644
index 00000000..5296503e
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabMultiplayerApi.js
@@ -0,0 +1,595 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.MultiplayerApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ CancelAllMatchmakingTicketsForPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CancelAllMatchmakingTicketsForPlayer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CancelAllServerBackfillTicketsForPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CancelAllServerBackfillTicketsForPlayer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CancelMatchmakingTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CancelMatchmakingTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CancelServerBackfillTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CancelServerBackfillTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateBuildAlias: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateBuildAlias", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateBuildWithCustomContainer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateBuildWithCustomContainer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateBuildWithManagedContainer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateBuildWithManagedContainer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateBuildWithProcessBasedServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateBuildWithProcessBasedServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/CreateLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateMatchmakingTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CreateMatchmakingTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateRemoteUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateRemoteUser", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateServerBackfillTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CreateServerBackfillTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateServerMatchmakingTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/CreateServerMatchmakingTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateTitleMultiplayerServersQuotaChange: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/CreateTitleMultiplayerServersQuotaChange", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteAsset: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteAsset", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteBuild: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteBuild", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteBuildAlias: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteBuildAlias", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteBuildRegion: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteBuildRegion", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteCertificate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteCertificate", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteContainerImageRepository: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteContainerImageRepository", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/DeleteLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteRemoteUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteRemoteUser", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/DeleteSecret", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ EnableMultiplayerServersForTitle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/EnableMultiplayerServersForTitle", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ FindFriendLobbies: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/FindFriendLobbies", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ FindLobbies: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/FindLobbies", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetAssetDownloadUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetAssetDownloadUrl", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetAssetUploadUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetAssetUploadUrl", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetBuild: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetBuild", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetBuildAlias: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetBuildAlias", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetContainerRegistryCredentials: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetContainerRegistryCredentials", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/GetLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMatch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/GetMatch", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMatchmakingQueue: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/GetMatchmakingQueue", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMatchmakingTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/GetMatchmakingTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMultiplayerServerDetails: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetMultiplayerServerDetails", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMultiplayerServerLogs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetMultiplayerServerLogs", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetMultiplayerSessionLogsBySessionId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetMultiplayerSessionLogsBySessionId", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetQueueStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/GetQueueStatistics", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetRemoteLoginEndpoint: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetRemoteLoginEndpoint", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetServerBackfillTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/GetServerBackfillTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTitleEnabledForMultiplayerServersStatus: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetTitleEnabledForMultiplayerServersStatus", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTitleMultiplayerServersQuotaChange: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetTitleMultiplayerServersQuotaChange", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTitleMultiplayerServersQuotas: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/GetTitleMultiplayerServersQuotas", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ InviteToLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/InviteToLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ JoinArrangedLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/JoinArrangedLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ JoinLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/JoinLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ JoinLobbyAsServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/JoinLobbyAsServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ JoinMatchmakingTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/JoinMatchmakingTicket", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ LeaveLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/LeaveLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ LeaveLobbyAsServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/LeaveLobbyAsServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListArchivedMultiplayerServers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListArchivedMultiplayerServers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListAssetSummaries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListAssetSummaries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListBuildAliases: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListBuildAliases", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListBuildSummariesV2: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListBuildSummariesV2", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListCertificateSummaries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListCertificateSummaries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListContainerImages: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListContainerImages", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListContainerImageTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListContainerImageTags", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListMatchmakingQueues: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/ListMatchmakingQueues", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListMatchmakingTicketsForPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/ListMatchmakingTicketsForPlayer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListMultiplayerServers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListMultiplayerServers", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListPartyQosServers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListPartyQosServers", request, null, callback, customData, extraHeaders);
+ },
+
+ ListQosServersForTitle: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListQosServersForTitle", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListSecretSummaries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListSecretSummaries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListServerBackfillTicketsForPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/ListServerBackfillTicketsForPlayer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListTitleMultiplayerServersQuotaChanges: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListTitleMultiplayerServersQuotaChanges", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListVirtualMachineSummaries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ListVirtualMachineSummaries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RemoveMatchmakingQueue: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/RemoveMatchmakingQueue", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RemoveMember: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/RemoveMember", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RequestMultiplayerServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/RequestMultiplayerServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RequestPartyService: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Party/RequestPartyService", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ RolloverContainerRegistryCredentials: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/RolloverContainerRegistryCredentials", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetMatchmakingQueue: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/SetMatchmakingQueue", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ShutdownMultiplayerServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/ShutdownMultiplayerServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SubscribeToLobbyResource: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/SubscribeToLobbyResource", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SubscribeToMatchmakingResource: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/SubscribeToMatchmakingResource", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnsubscribeFromLobbyResource: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/UnsubscribeFromLobbyResource", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnsubscribeFromMatchmakingResource: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Match/UnsubscribeFromMatchmakingResource", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UntagContainerImage: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UntagContainerImage", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateBuildAlias: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UpdateBuildAlias", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateBuildName: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UpdateBuildName", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateBuildRegion: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UpdateBuildRegion", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateBuildRegions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UpdateBuildRegions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateLobby: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/UpdateLobby", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateLobbyAsServer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Lobby/UpdateLobbyAsServer", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UploadCertificate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UploadCertificate", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UploadSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/MultiplayerServer/UploadSecret", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabMultiplayerSDK = PlayFab.MultiplayerApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabProfilesApi.js b/PlayFabSdk/src/PlayFab/PlayFabProfilesApi.js
new file mode 100644
index 00000000..4458cc60
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabProfilesApi.js
@@ -0,0 +1,283 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.ProfilesApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ GetGlobalPolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/GetGlobalPolicy", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetProfile: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/GetProfile", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetProfiles: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/GetProfiles", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTitlePlayersFromMasterPlayerAccountIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/GetTitlePlayersFromMasterPlayerAccountIds", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetTitlePlayersFromXboxLiveIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/GetTitlePlayersFromXboxLiveIDs", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetDisplayName: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/SetDisplayName", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetGlobalPolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/SetGlobalPolicy", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetProfileLanguage: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/SetProfileLanguage", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ SetProfilePolicy: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Profile/SetProfilePolicy", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabProfilesSDK = PlayFab.ProfilesApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabProgressionApi.js b/PlayFabSdk/src/PlayFab/PlayFabProgressionApi.js
new file mode 100644
index 00000000..18a54ef9
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabProgressionApi.js
@@ -0,0 +1,343 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.ProgressionApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ CreateLeaderboardDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/CreateLeaderboardDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ CreateStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/CreateStatisticDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteLeaderboardDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/DeleteLeaderboardDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteLeaderboardEntries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/DeleteLeaderboardEntries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/DeleteStatisticDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ DeleteStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/DeleteStatistics", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetFriendLeaderboardForEntity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/GetFriendLeaderboardForEntity", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/GetLeaderboard", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardAroundEntity: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardAroundEntity", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardForEntities: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardForEntities", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/GetStatisticDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/GetStatistics", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ GetStatisticsForEntities: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/GetStatisticsForEntities", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ IncrementLeaderboardVersion: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/IncrementLeaderboardVersion", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ IncrementStatisticVersion: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/IncrementStatisticVersion", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListLeaderboardDefinitions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/ListLeaderboardDefinitions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ ListStatisticDefinitions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/ListStatisticDefinitions", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnlinkAggregationSourceFromStatistic: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/UnlinkAggregationSourceFromStatistic", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UnlinkLeaderboardFromStatistic: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/UnlinkLeaderboardFromStatistic", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateLeaderboardDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/UpdateLeaderboardDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateLeaderboardEntries: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Leaderboard/UpdateLeaderboardEntries", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateStatisticDefinition: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/UpdateStatisticDefinition", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+ UpdateStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Statistic/UpdateStatistics", request, "X-EntityToken", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabProgressionSDK = PlayFab.ProgressionApi;
+
diff --git a/PlayFabSdk/src/PlayFab/PlayFabServerApi.js b/PlayFabSdk/src/PlayFab/PlayFabServerApi.js
new file mode 100644
index 00000000..b57d0ebd
--- /dev/null
+++ b/PlayFabSdk/src/PlayFab/PlayFabServerApi.js
@@ -0,0 +1,895 @@
+///
+
+var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
+
+if(!PlayFab.settings) {
+ PlayFab.settings = {
+ titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
+ GlobalHeaderInjection: null,
+ productionServerUrl: ".playfabapi.com"
+ }
+}
+
+if(!PlayFab._internalSettings) {
+ PlayFab._internalSettings = {
+ entityToken: null,
+ sdkVersion: "1.217.260605",
+ requestGetParams: {
+ sdk: "JavaScriptSDK-1.217.260605"
+ },
+ sessionTicket: null,
+ verticalName: null, // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
+ errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
+ errorLoggedIn: "Must be logged in to call this method",
+ errorEntityToken: "You must successfully call GetEntityToken before calling this",
+ errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
+
+ GetServerUrl: function () {
+ if (!(PlayFab.settings.productionServerUrl.substring(0, 4) === "http")) {
+ if (PlayFab._internalSettings.verticalName) {
+ return "https://" + PlayFab._internalSettings.verticalName + PlayFab.settings.productionServerUrl;
+ } else {
+ return "https://" + PlayFab.settings.titleId + PlayFab.settings.productionServerUrl;
+ }
+ } else {
+ return PlayFab.settings.productionServerUrl;
+ }
+ },
+
+ InjectHeaders: function (xhr, headersObj) {
+ if (!headersObj)
+ return;
+
+ for (var headerKey in headersObj)
+ {
+ try {
+ xhr.setRequestHeader(gHeaderKey, headersObj[headerKey]);
+ } catch (e) {
+ console.log("Failed to append header: " + headerKey + " = " + headersObj[headerKey] + "Error: " + e);
+ }
+ }
+ },
+
+ ExecuteRequest: function (url, request, authkey, authValue, callback, customData, extraHeaders) {
+ var resultPromise = new Promise(function (resolve, reject) {
+ if (callback != null && typeof (callback) !== "function")
+ throw "Callback must be null or a function";
+
+ if (request == null)
+ request = {};
+
+ var startTime = new Date();
+ var requestBody = JSON.stringify(request);
+
+ var urlArr = [url];
+ var getParams = PlayFab._internalSettings.requestGetParams;
+ if (getParams != null) {
+ var firstParam = true;
+ for (var key in getParams) {
+ if (firstParam) {
+ urlArr.push("?");
+ firstParam = false;
+ } else {
+ urlArr.push("&");
+ }
+ urlArr.push(key);
+ urlArr.push("=");
+ urlArr.push(getParams[key]);
+ }
+ }
+
+ var completeUrl = urlArr.join("");
+
+ var xhr = new XMLHttpRequest();
+ // window.console.log("URL: " + completeUrl);
+ xhr.open("POST", completeUrl, true);
+
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
+ if (authkey != null)
+ xhr.setRequestHeader(authkey, authValue);
+ PlayFab._internalSettings.InjectHeaders(xhr, PlayFab.settings.GlobalHeaderInjection);
+ PlayFab._internalSettings.InjectHeaders(xhr, extraHeaders);
+
+ xhr.onloadend = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ if (result.code === 200) {
+ callback(result, null);
+ } else {
+ callback(null, result);
+ }
+ }
+
+ xhr.onerror = function () {
+ if (callback == null)
+ return;
+
+ var result = PlayFab._internalSettings.GetPlayFabResponse(request, xhr, startTime, customData);
+ callback(null, result);
+ }
+
+ xhr.send(requestBody);
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4) {
+ var xhrResult = PlayFab._internalSettings.GetPlayFabResponse(request, this, startTime, customData);
+ if (this.status === 200) {
+ resolve(xhrResult);
+ } else {
+ reject(xhrResult);
+ }
+ }
+ };
+ });
+ // Return a Promise so that calls to various API methods can be handled asynchronously
+ return resultPromise;
+ },
+
+ GetPlayFabResponse: function(request, xhr, startTime, customData) {
+ var result = null;
+ try {
+ // window.console.log("parsing json result: " + xhr.responseText);
+ result = JSON.parse(xhr.responseText);
+ } catch (e) {
+ result = {
+ code: 503, // Service Unavailable
+ status: "Service Unavailable",
+ error: "Connection error",
+ errorCode: 2, // PlayFabErrorCode.ConnectionError
+ errorMessage: xhr.responseText
+ };
+ }
+
+ result.CallBackTimeMS = new Date() - startTime;
+ result.Request = request;
+ result.CustomData = customData;
+ return result;
+ },
+
+ authenticationContext: {
+ PlayFabId: null,
+ EntityId: null,
+ EntityType: null,
+ SessionTicket: null,
+ EntityToken: null
+ },
+
+ UpdateAuthenticationContext: function (authenticationContext, result) {
+ var authenticationContextUpdates = {};
+ if(result.data.PlayFabId !== null) {
+ PlayFab._internalSettings.authenticationContext.PlayFabId = result.data.PlayFabId;
+ authenticationContextUpdates.PlayFabId = result.data.PlayFabId;
+ }
+ if(result.data.SessionTicket !== null) {
+ PlayFab._internalSettings.authenticationContext.SessionTicket = result.data.SessionTicket;
+ authenticationContextUpdates.SessionTicket = result.data.SessionTicket;
+ }
+ if (result.data.EntityToken !== null) {
+ PlayFab._internalSettings.authenticationContext.EntityId = result.data.EntityToken.Entity.Id;
+ authenticationContextUpdates.EntityId = result.data.EntityToken.Entity.Id;
+ PlayFab._internalSettings.authenticationContext.EntityType = result.data.EntityToken.Entity.Type;
+ authenticationContextUpdates.EntityType = result.data.EntityToken.Entity.Type;
+ PlayFab._internalSettings.authenticationContext.EntityToken = result.data.EntityToken.EntityToken;
+ authenticationContextUpdates.EntityToken = result.data.EntityToken.EntityToken;
+ }
+ // Update the authenticationContext with values from the result
+ authenticationContext = Object.assign(authenticationContext, authenticationContextUpdates);
+ return authenticationContext;
+ },
+
+ AuthInfoMap: {
+ "X-EntityToken": {
+ authAttr: "entityToken",
+ authError: "errorEntityToken"
+ },
+ "X-Authorization": {
+ authAttr: "sessionTicket",
+ authError: "errorLoggedIn"
+ },
+ "X-SecretKey": {
+ authAttr: "developerSecretKey",
+ authError: "errorSecretKey"
+ }
+ },
+
+ GetAuthInfo: function (request, authKey) {
+ // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext
+ var authError = PlayFab._internalSettings.AuthInfoMap[authKey].authError;
+ var authAttr = PlayFab._internalSettings.AuthInfoMap[authKey].authAttr;
+ var defaultAuthValue = null;
+ if (authAttr === "entityToken")
+ defaultAuthValue = PlayFab._internalSettings.entityToken;
+ else if (authAttr === "sessionTicket")
+ defaultAuthValue = PlayFab._internalSettings.sessionTicket;
+ else if (authAttr === "developerSecretKey")
+ defaultAuthValue = PlayFab.settings.developerSecretKey;
+ var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
+ return {"authKey": authKey, "authValue": authValue, "authError": authError};
+ },
+
+ ExecuteRequestWrapper: function (apiURL, request, authKey, callback, customData, extraHeaders) {
+ var authValue = null;
+ if (authKey !== null){
+ var authInfo = PlayFab._internalSettings.GetAuthInfo(request, authKey=authKey);
+ var authKey = authInfo.authKey, authValue = authInfo.authValue, authError = authInfo.authError;
+
+ if (!authValue) throw authError;
+ }
+ return PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + apiURL, request, authKey, authValue, callback, customData, extraHeaders);
+ }
+ }
+}
+
+PlayFab.buildIdentifier = "adobuild_javascriptsdk_114";
+PlayFab.sdkVersion = "1.217.260605";
+PlayFab.GenerateErrorReport = function (error) {
+ if (error == null)
+ return "";
+ var fullErrors = error.errorMessage;
+ for (var paramName in error.errorDetails)
+ for (var msgIdx in error.errorDetails[paramName])
+ fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
+ return fullErrors;
+};
+
+PlayFab.ServerApi = {
+ ForgetAllCredentials: function () {
+ PlayFab._internalSettings.sessionTicket = null;
+ PlayFab._internalSettings.entityToken = null;
+ },
+
+ AddCharacterVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddCharacterVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddFriend: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddFriend", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddGenericID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddGenericID", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddOrUpdateContactEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddOrUpdateContactEmail", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddPlayerTag: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddPlayerTag", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddSharedGroupMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddSharedGroupMembers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AddUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AddUserVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AuthenticateSessionTicket: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AuthenticateSessionTicket", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ AwardSteamAchievement: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/AwardSteamAchievement", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ BanUsers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/BanUsers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ConsumeItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ConsumeItem", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ CreateSharedGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/CreateSharedGroup", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteCharacterFromUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/DeleteCharacterFromUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/DeletePlayer", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/DeletePlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeletePushNotificationTemplate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/DeletePushNotificationTemplate", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ DeleteSharedGroup: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/DeleteSharedGroup", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ EvaluateRandomResultTable: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/EvaluateRandomResultTable", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ExecuteCloudScript: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ExecuteCloudScript", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ExportPlayersInSegment: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ExportPlayersInSegment", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetAllSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetAllSegments", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetAllUsersCharacters: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetAllUsersCharacters", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCatalogItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCatalogItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterInventory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterInventory", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterLeaderboard", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetCharacterStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetCharacterStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetContentDownloadUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetContentDownloadUrl", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetFriendLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetFriendLeaderboard", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetFriendsList: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetFriendsList", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboard: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetLeaderboard", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardAroundCharacter: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetLeaderboardAroundCharacter", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardAroundUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetLeaderboardAroundUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetLeaderboardForUserCharacters: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetLeaderboardForUserCharacters", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerCombinedInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerCombinedInfo", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerCustomProperty: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerCustomProperty", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerProfile: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerProfile", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerSegments: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerSegments", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerStatisticVersions: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerStatisticVersions", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayerTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayerTags", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromBattleNetAccountIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromBattleNetAccountIds", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromFacebookIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromFacebookIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromFacebookInstantGamesIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromFacebookInstantGamesIds", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromGenericIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromGenericIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromNintendoServiceAccountIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromNintendoServiceAccountIds", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromNintendoSwitchDeviceIds: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromOpenIdSubjectIdentifiers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromOpenIdSubjectIdentifiers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromPSNAccountIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromPSNAccountIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromPSNOnlineIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromPSNOnlineIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromServerCustomIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromServerCustomIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromSteamIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromSteamIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromSteamNames: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromSteamNames", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromTwitchIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromTwitchIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPlayFabIDsFromXboxLiveIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPlayFabIDsFromXboxLiveIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetRandomResultTables: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetRandomResultTables", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSegmentExport: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetSegmentExport", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSegmentPlayerCount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetSegmentPlayerCount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetServerCustomIDsFromPlayFabIDs: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetServerCustomIDsFromPlayFabIDs", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetSharedGroupData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetSharedGroupData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetStoreItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetStoreItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTime: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetTime", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTitleData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetTitleData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTitleInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetTitleInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetTitleNews: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetTitleNews", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserAccountInfo: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserAccountInfo", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserInventory: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserInventory", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserPublisherInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserPublisherReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserPublisherReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GetUserReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GetUserReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GrantCharacterToUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GrantCharacterToUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GrantItemsToCharacter: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GrantItemsToCharacter", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GrantItemsToUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GrantItemsToUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ GrantItemsToUsers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/GrantItemsToUsers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkBattleNetAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkBattleNetAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkNintendoServiceAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkNintendoServiceAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkNintendoServiceAccountSubject: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkNintendoServiceAccountSubject", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkNintendoSwitchDeviceId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkNintendoSwitchDeviceId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkPSNAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkPSNAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkPSNId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkPSNId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkServerCustomId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkServerCustomId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkSteamId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkSteamId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkTwitchAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkTwitchAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkXboxAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkXboxAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LinkXboxId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LinkXboxId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ListPlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ListPlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithAndroidDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithAndroidDeviceID", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithBattleNet: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithBattleNet", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithCustomID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithCustomID", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithIOSDeviceID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithIOSDeviceID", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithPSN: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithPSN", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithServerCustomId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithServerCustomId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithSteamId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithSteamId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithTwitch: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithTwitch", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithXbox: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithXbox", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ LoginWithXboxId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/LoginWithXboxId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ModifyItemUses: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ModifyItemUses", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ MoveItemToCharacterFromCharacter: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/MoveItemToCharacterFromCharacter", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ MoveItemToCharacterFromUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/MoveItemToCharacterFromUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ MoveItemToUserFromCharacter: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/MoveItemToUserFromCharacter", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RedeemCoupon: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RedeemCoupon", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemoveFriend: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RemoveFriend", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemoveGenericID: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RemoveGenericID", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemovePlayerTag: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RemovePlayerTag", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RemoveSharedGroupMembers: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RemoveSharedGroupMembers", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ ReportPlayer: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/ReportPlayer", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeAllBansForUser: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RevokeAllBansForUser", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RevokeBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeInventoryItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RevokeInventoryItem", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ RevokeInventoryItems: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/RevokeInventoryItems", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SavePushNotificationTemplate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SavePushNotificationTemplate", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SendCustomAccountRecoveryEmail: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SendCustomAccountRecoveryEmail", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SendEmailFromTemplate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SendEmailFromTemplate", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SendPushNotification: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SendPushNotification", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SendPushNotificationFromTemplate: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SendPushNotificationFromTemplate", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetFriendTags: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SetFriendTags", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetPlayerSecret: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SetPlayerSecret", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SetPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetTitleData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SetTitleData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SetTitleInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SetTitleInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SubtractCharacterVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SubtractCharacterVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ SubtractUserVirtualCurrency: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/SubtractUserVirtualCurrency", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkApple: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkApple", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkBattleNetAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkBattleNetAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkFacebookAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkFacebookAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkFacebookInstantGamesId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkFacebookInstantGamesId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkGameCenterAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkGameCenterAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkNintendoServiceAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkNintendoServiceAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkNintendoSwitchDeviceId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkNintendoSwitchDeviceId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkPSNAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkPSNAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkServerCustomId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkServerCustomId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkSteamId: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkSteamId", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkTwitchAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkTwitchAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlinkXboxAccount: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlinkXboxAccount", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlockContainerInstance: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlockContainerInstance", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UnlockContainerItem: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UnlockContainerItem", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateAvatarUrl: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateAvatarUrl", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateBans: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateBans", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateCharacterData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateCharacterInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateCharacterReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateCharacterStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateCharacterStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerCustomProperties: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdatePlayerCustomProperties", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdatePlayerStatistics: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdatePlayerStatistics", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateSharedGroupData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateSharedGroupData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserInventoryItemCustomData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserInventoryItemCustomData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserPublisherData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherInternalData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserPublisherInternalData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserPublisherReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ UpdateUserReadOnlyData: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/UpdateUserReadOnlyData", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ WriteCharacterEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/WriteCharacterEvent", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ WritePlayerEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/WritePlayerEvent", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+ WriteTitleEvent: function (request, callback, customData, extraHeaders) {
+ return PlayFab._internalSettings.ExecuteRequestWrapper("/Server/WriteTitleEvent", request, "X-SecretKey", callback, customData, extraHeaders);
+ },
+
+};
+
+var PlayFabServerSDK = PlayFab.ServerApi;
+
diff --git a/PlayFabSdk/src/Typings/PlayFab/PlayFabAddonApi.d.ts b/PlayFabSdk/src/Typings/PlayFab/PlayFabAddonApi.d.ts
new file mode 100644
index 00000000..0abfa783
--- /dev/null
+++ b/PlayFabSdk/src/Typings/PlayFab/PlayFabAddonApi.d.ts
@@ -0,0 +1,739 @@
+///
+
+declare module PlayFabAddonModule {
+ export interface IPlayFabAddon {
+ ForgetAllCredentials(): void;
+
+ /**
+ * Creates the Apple addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdateapple
+ */
+ CreateOrUpdateApple(request: PlayFabAddonModels.CreateOrUpdateAppleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Facebook addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatefacebook
+ */
+ CreateOrUpdateFacebook(request: PlayFabAddonModels.CreateOrUpdateFacebookRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Facebook Instant Games addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatefacebookinstantgames
+ */
+ CreateOrUpdateFacebookInstantGames(request: PlayFabAddonModels.CreateOrUpdateFacebookInstantGamesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Google addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdategoogle
+ */
+ CreateOrUpdateGoogle(request: PlayFabAddonModels.CreateOrUpdateGoogleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Kongregate addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatekongregate
+ */
+ CreateOrUpdateKongregate(request: PlayFabAddonModels.CreateOrUpdateKongregateRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Nintendo addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatenintendo
+ */
+ CreateOrUpdateNintendo(request: PlayFabAddonModels.CreateOrUpdateNintendoRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the PSN addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatepsn
+ */
+ CreateOrUpdatePSN(request: PlayFabAddonModels.CreateOrUpdatePSNRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Steam addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatesteam
+ */
+ CreateOrUpdateSteam(request: PlayFabAddonModels.CreateOrUpdateSteamRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the ToxMod addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatetoxmod
+ */
+ CreateOrUpdateToxMod(request: PlayFabAddonModels.CreateOrUpdateToxModRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates the Twitch addon on a title, or updates it if it already exists.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/createorupdatetwitch
+ */
+ CreateOrUpdateTwitch(request: PlayFabAddonModels.CreateOrUpdateTwitchRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Apple addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deleteapple
+ */
+ DeleteApple(request: PlayFabAddonModels.DeleteAppleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Facebook addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletefacebook
+ */
+ DeleteFacebook(request: PlayFabAddonModels.DeleteFacebookRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Facebook addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletefacebookinstantgames
+ */
+ DeleteFacebookInstantGames(request: PlayFabAddonModels.DeleteFacebookInstantGamesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Google addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletegoogle
+ */
+ DeleteGoogle(request: PlayFabAddonModels.DeleteGoogleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Kongregate addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletekongregate
+ */
+ DeleteKongregate(request: PlayFabAddonModels.DeleteKongregateRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Nintendo addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletenintendo
+ */
+ DeleteNintendo(request: PlayFabAddonModels.DeleteNintendoRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the PSN addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletepsn
+ */
+ DeletePSN(request: PlayFabAddonModels.DeletePSNRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Steam addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletesteam
+ */
+ DeleteSteam(request: PlayFabAddonModels.DeleteSteamRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the ToxMod addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletetoxmod
+ */
+ DeleteToxMod(request: PlayFabAddonModels.DeleteToxModRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes the Twitch addon on a title.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/deletetwitch
+ */
+ DeleteTwitch(request: PlayFabAddonModels.DeleteTwitchRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Apple addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getapple
+ */
+ GetApple(request: PlayFabAddonModels.GetAppleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Facebook addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getfacebook
+ */
+ GetFacebook(request: PlayFabAddonModels.GetFacebookRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Facebook Instant Games addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getfacebookinstantgames
+ */
+ GetFacebookInstantGames(request: PlayFabAddonModels.GetFacebookInstantGamesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Google addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getgoogle
+ */
+ GetGoogle(request: PlayFabAddonModels.GetGoogleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Kongregate addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getkongregate
+ */
+ GetKongregate(request: PlayFabAddonModels.GetKongregateRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Nintendo addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getnintendo
+ */
+ GetNintendo(request: PlayFabAddonModels.GetNintendoRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the PSN addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getpsn
+ */
+ GetPSN(request: PlayFabAddonModels.GetPSNRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Steam addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/getsteam
+ */
+ GetSteam(request: PlayFabAddonModels.GetSteamRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the ToxMod addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/gettoxmod
+ */
+ GetToxMod(request: PlayFabAddonModels.GetToxModRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets information of the Twitch addon on a title, omits secrets.
+ * https://docs.microsoft.com/rest/api/playfab/addon/addon/gettwitch
+ */
+ GetTwitch(request: PlayFabAddonModels.GetTwitchRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+
+ }
+}
+
+declare module PlayFabAddonModels {
+ export interface CreateOrUpdateAppleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Allow validation of receipts from the Apple production environment. Required for app releases. */
+ AllowProduction?: boolean;
+ /** Allow validation of receipts from the Apple sandbox environment. Typically used while testing. */
+ AllowSandbox?: boolean;
+ /** iOS App Bundle ID obtained after setting up your app in the App Store. */
+ AppBundleId: string;
+ /** AppId obtained after setting up your app in the App Store. */
+ AppId?: string;
+ /** iOS App Shared Secret obtained after setting up your app in the App Store. */
+ AppSharedSecret?: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /**
+ * Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the
+ * case where Apple rotates their signing keys.
+ */
+ IgnoreExpirationDate?: boolean;
+ /** IssuerId obtained after setting up your app in the App Store. */
+ IssuerId?: string;
+ /** KeyId obtained after setting up your app in the App Store. */
+ KeyId?: string;
+ /** PrivateKey obtained after setting up your app in the App Store. */
+ PrivateKey?: string;
+ /** Require secure authentication only for this app. */
+ RequireSecureAuthentication?: boolean;
+
+ }
+
+ export interface CreateOrUpdateAppleResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateFacebookInstantGamesRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */
+ AppID: string;
+ /** Facebook App Secret obtained after setting up your app in Facebook Instant Games. */
+ AppSecret: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+
+ }
+
+ export interface CreateOrUpdateFacebookInstantGamesResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateFacebookRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Facebook App ID obtained after setting up your app in Facebook. */
+ AppID: string;
+ /** Facebook App Secret obtained after setting up your app in Facebook. */
+ AppSecret: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /** Email address for purchase dispute notifications. */
+ NotificationEmail: string;
+
+ }
+
+ export interface CreateOrUpdateFacebookResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateGoogleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /**
+ * Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google
+ * receipt validation.
+ */
+ AppLicenseKey?: string;
+ /**
+ * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google
+ * receipt validation.
+ */
+ AppPackageID?: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /**
+ * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
+ * Required if using Google Authentication.
+ */
+ OAuthClientID?: string;
+ /**
+ * Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
+ * Required if using Google Authentication.
+ */
+ OAuthClientSecret?: string;
+ /**
+ * Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to
+ * https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own
+ * domain.
+ */
+ OAuthCustomRedirectUri?: string;
+ /** Needed to enable pending purchase handling and subscription processing. */
+ ServiceAccountKey?: string;
+
+ }
+
+ export interface CreateOrUpdateGoogleResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateKongregateRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /** Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. */
+ SecretAPIKey: string;
+
+ }
+
+ export interface CreateOrUpdateKongregateResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateNintendoRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Nintendo Switch Application ID, without the "0x" prefix. */
+ ApplicationID?: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. */
+ Environments?: NintendoEnvironment[];
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /** List of Nintendo Subscription Environments, currently supporting up to 4. Needs Catalog enabled. */
+ SubscriptionEnvironments?: NintendoEnvironment[];
+
+ }
+
+ export interface CreateOrUpdateNintendoResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdatePSNRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */
+ ClientID?: string;
+ /** Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */
+ ClientSecret?: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /**
+ * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
+ * includes PS5, cross-generation for PS4, and unified entitlements.
+ */
+ NextGenClientID?: string;
+ /**
+ * Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
+ * includes PS5, cross-generation for PS4, and unified entitlements.
+ */
+ NextGenClientSecret?: string;
+
+ }
+
+ export interface CreateOrUpdatePSNResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateSteamRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Application ID obtained after setting up your app in Valve's developer portal. */
+ ApplicationId: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** Enforce usage of AzurePlayFab identity in user authentication tickets. */
+ EnforceServiceSpecificTickets?: boolean;
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+ /** Sercet Key obtained after setting up your app in Valve's developer portal. */
+ SecretKey: string;
+ /** Use Steam Payments sandbox endpoint for test transactions. */
+ UseSandbox?: boolean;
+
+ }
+
+ export interface CreateOrUpdateSteamResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateToxModRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Account ID obtained after creating your ToxMod developer account. */
+ AccountId: string;
+ /** Account Key obtained after creating your ToxMod developer account. */
+ AccountKey: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** Whether ToxMod Addon is Enabled by Title. */
+ Enabled: boolean;
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+
+ }
+
+ export interface CreateOrUpdateToxModResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface CreateOrUpdateTwitchRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** Client ID obtained after creating your Twitch developer account. */
+ ClientID?: string;
+ /** Client Secret obtained after creating your Twitch developer account. */
+ ClientSecret?: string;
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+ /** If an error should be returned if the addon already exists. */
+ ErrorIfExists?: boolean;
+
+ }
+
+ export interface CreateOrUpdateTwitchResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteAppleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteAppleResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteFacebookInstantGamesRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteFacebookInstantGamesResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteFacebookRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteFacebookResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteGoogleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteGoogleResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteKongregateRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteKongregateResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteNintendoRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteNintendoResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeletePSNRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeletePSNResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteSteamRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteSteamResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteToxModRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteToxModResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface DeleteTwitchRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface DeleteTwitchResponse extends PlayFabModule.IPlayFabResultCommon {
+
+ }
+
+ export interface EntityKey {
+ /** Unique ID of the entity. */
+ Id: string;
+ /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
+ Type?: string;
+
+ }
+
+ export interface GetAppleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetAppleResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** iOS App Bundle ID obtained after setting up your app in the App Store. */
+ AppBundleId?: string;
+ /** Addon status. */
+ Created: boolean;
+ /** Ignore expiration date for identity tokens. */
+ IgnoreExpirationDate?: boolean;
+ /** Require secure authentication only for this app. */
+ RequireSecureAuthentication?: boolean;
+
+ }
+
+ export interface GetFacebookInstantGamesRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetFacebookInstantGamesResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */
+ AppID?: string;
+ /** Addon status. */
+ Created: boolean;
+
+ }
+
+ export interface GetFacebookRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetFacebookResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Facebook App ID obtained after setting up your app in Facebook. */
+ AppID?: string;
+ /** Addon status. */
+ Created: boolean;
+ /** Email address for purchase dispute notifications. */
+ NotificationEmail?: string;
+
+ }
+
+ export interface GetGoogleRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetGoogleResponse extends PlayFabModule.IPlayFabResultCommon {
+ /**
+ * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google
+ * receipt validation.
+ */
+ AppPackageID?: string;
+ /** Addon status. */
+ Created: boolean;
+ /**
+ * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
+ * Required if using Google Authentication.
+ */
+ OAuthClientID?: string;
+ /**
+ * Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to
+ * https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own
+ * domain.
+ */
+ OauthCustomRedirectUri?: string;
+
+ }
+
+ export interface GetKongregateRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetKongregateResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Addon status. */
+ Created: boolean;
+
+ }
+
+ export interface GetNintendoRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetNintendoResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Nintendo Switch Application ID, without the "0x" prefix. */
+ ApplicationID?: string;
+ /** Addon status. */
+ Created: boolean;
+ /** List of Nintendo Environments, currently supporting up to 4. */
+ Environments?: NintendoEnvironment[];
+ /** List of Nintendo Subscription Environments associated to a secondary AppId, currently supporting up to 4. */
+ SecondarySubscriptionEnvironments?: NintendoEnvironment[];
+ /** List of Nintendo Subscription Environments, currently supporting up to 4. */
+ SubscriptionEnvironments?: NintendoEnvironment[];
+
+ }
+
+ export interface GetPSNRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetPSNResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */
+ ClientID?: string;
+ /** Addon status. */
+ Created: boolean;
+ /**
+ * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
+ * includes PS5, cross-generation for PS4, and unified entitlements.
+ */
+ NextGenClientID?: string;
+
+ }
+
+ export interface GetSteamRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetSteamResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Application ID obtained after setting up your game in Valve's developer portal. */
+ ApplicationId?: string;
+ /** Addon status. */
+ Created: boolean;
+ /** Enforce usage of AzurePlayFab identity in user authentication tickets. */
+ EnforceServiceSpecificTickets?: boolean;
+ /** Use Steam Payments sandbox endpoint for test transactions. */
+ UseSandbox?: boolean;
+
+ }
+
+ export interface GetToxModRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetToxModResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Account ID obtained after creating your Twitch developer account. */
+ AccountId?: string;
+ /** Account Key obtained after creating your Twitch developer account. */
+ AccountKey?: string;
+ /** Addon status. */
+ Created: boolean;
+ /** Whether the ToxMod Addon is enabled by the title. */
+ Enabled: boolean;
+
+ }
+
+ export interface GetTwitchRequest extends PlayFabModule.IPlayFabRequestCommon {
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
+ CustomTags?: { [key: string]: string | null };
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
+ Entity?: EntityKey;
+
+ }
+
+ export interface GetTwitchResponse extends PlayFabModule.IPlayFabResultCommon {
+ /** Client ID obtained after creating your Twitch developer account. */
+ ClientID?: string;
+ /** Addon status. */
+ Created: boolean;
+
+ }
+
+ export interface NintendoEnvironment {
+ /** Client ID for the Nintendo Environment. */
+ ClientID?: string;
+ /** Client Secret for the Nintendo Environment. */
+ ClientSecret?: string;
+ /** ID for the Nintendo Environment. */
+ ID?: string;
+
+ }
+
+
+}
diff --git a/PlayFabSdk/src/Typings/PlayFab/PlayFabAdminApi.d.ts b/PlayFabSdk/src/Typings/PlayFab/PlayFabAdminApi.d.ts
new file mode 100644
index 00000000..8a96312d
--- /dev/null
+++ b/PlayFabSdk/src/Typings/PlayFab/PlayFabAdminApi.d.ts
@@ -0,0 +1,6106 @@
+///
+
+declare module PlayFabAdminModule {
+ export interface IPlayFabAdmin {
+ ForgetAllCredentials(): void;
+
+ /**
+ * Abort an ongoing task instance.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/aborttaskinstance
+ */
+ AbortTaskInstance(request: PlayFabAdminModels.AbortTaskInstanceRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Update news item to include localized version
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/addlocalizednews
+ */
+ AddLocalizedNews(request: PlayFabAdminModels.AddLocalizedNewsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Adds a new news item to the title's news feed
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/addnews
+ */
+ AddNews(request: PlayFabAdminModels.AddNewsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/addplayertag
+ */
+ AddPlayerTag(request: PlayFabAdminModels.AddPlayerTagRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Increments the specified virtual currency by the stated amount
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/adduservirtualcurrency
+ */
+ AddUserVirtualCurrency(request: PlayFabAdminModels.AddUserVirtualCurrencyRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum
+ * value of 2,147,483,647 when granted to a player. Any value over that will be discarded.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/addvirtualcurrencytypes
+ */
+ AddVirtualCurrencyTypes(request: PlayFabAdminModels.AddVirtualCurrencyTypesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Bans users by PlayFab ID with optional IP address for the provided game.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/banusers
+ */
+ BanUsers(request: PlayFabAdminModels.BanUsersRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Checks the global count for the limited edition item.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/checklimitededitionitemavailability
+ */
+ CheckLimitedEditionItemAvailability(request: PlayFabAdminModels.CheckLimitedEditionItemAvailabilityRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/createactionsonplayersinsegmenttask
+ */
+ CreateActionsOnPlayersInSegmentTask(request: PlayFabAdminModels.CreateActionsOnPlayerSegmentTaskRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Create a CloudScript task, which can run a CloudScript on a schedule.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/createcloudscripttask
+ */
+ CreateCloudScriptTask(request: PlayFabAdminModels.CreateCloudScriptTaskRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/createinsightsscheduledscalingtask
+ */
+ CreateInsightsScheduledScalingTask(request: PlayFabAdminModels.CreateInsightsScheduledScalingTaskRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Registers a relationship between a title and an Open ID Connect provider.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/createopenidconnection
+ */
+ CreateOpenIdConnection(request: PlayFabAdminModels.CreateOpenIdConnectionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * 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.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/createplayersharedsecret
+ */
+ CreatePlayerSharedSecret(request: PlayFabAdminModels.CreatePlayerSharedSecretRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval
+ * and an aggregation method.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/createplayerstatisticdefinition
+ */
+ CreatePlayerStatisticDefinition(request: PlayFabAdminModels.CreatePlayerStatisticDefinitionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates a new player segment by defining the conditions on player properties. Also, create actions to target the player
+ * segments for a title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/segments/createsegment
+ */
+ CreateSegment(request: PlayFabAdminModels.CreateSegmentRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Delete a content file from the title. When deleting a file that does not exist, it returns success.
+ * https://docs.microsoft.com/rest/api/playfab/admin/content/deletecontent
+ */
+ DeleteContent(request: PlayFabAdminModels.DeleteContentRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Removes a master player account entirely from all titles and deletes all associated data
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/deletemasterplayeraccount
+ */
+ DeleteMasterPlayerAccount(request: PlayFabAdminModels.DeleteMasterPlayerAccountRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes PlayStream and telemetry event data associated with the master player account from PlayFab storage
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/deletemasterplayereventdata
+ */
+ DeleteMasterPlayerEventData(request: PlayFabAdminModels.DeleteMasterPlayerEventDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes a player's subscription
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/deletemembershipsubscription
+ */
+ DeleteMembershipSubscription(request: PlayFabAdminModels.DeleteMembershipSubscriptionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Removes a relationship between a title and an OpenID Connect provider.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/deleteopenidconnection
+ */
+ DeleteOpenIdConnection(request: PlayFabAdminModels.DeleteOpenIdConnectionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Removes a user's player account from a title and deletes all associated data
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/deleteplayer
+ */
+ DeletePlayer(request: PlayFabAdminModels.DeletePlayerRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes title-specific custom properties for a player
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/deleteplayercustomproperties
+ */
+ DeletePlayerCustomProperties(request: PlayFabAdminModels.DeletePlayerCustomPropertiesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API
+ * returns.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/deleteplayersharedsecret
+ */
+ DeletePlayerSharedSecret(request: PlayFabAdminModels.DeletePlayerSharedSecretRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes an existing player segment and its associated action(s) for a title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/segments/deletesegment
+ */
+ DeleteSegment(request: PlayFabAdminModels.DeleteSegmentRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Deletes an existing virtual item store
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/deletestore
+ */
+ DeleteStore(request: PlayFabAdminModels.DeleteStoreRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Delete a task.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/deletetask
+ */
+ DeleteTask(request: PlayFabAdminModels.DeleteTaskRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Permanently deletes a title and all associated configuration
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/deletetitle
+ */
+ DeleteTitle(request: PlayFabAdminModels.DeleteTitleRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Deletes a specified set of title data overrides.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/deletetitledataoverride
+ */
+ DeleteTitleDataOverride(request: PlayFabAdminModels.DeleteTitleDataOverrideRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Exports all associated data of a master player account
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/exportmasterplayerdata
+ */
+ ExportMasterPlayerData(request: PlayFabAdminModels.ExportMasterPlayerDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Starts an export for the player profiles in a segment. This API creates a snapshot of all the player profiles which
+ * match the segment definition at the time of the API call. Profiles which change while an export is in progress will not
+ * be reflected in the results.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/exportplayersinsegment
+ */
+ ExportPlayersInSegment(request: PlayFabAdminModels.ExportPlayersInSegmentRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get information about a ActionsOnPlayersInSegment task instance.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/getactionsonplayersinsegmenttaskinstance
+ */
+ GetActionsOnPlayersInSegmentTaskInstance(request: PlayFabAdminModels.GetTaskInstanceRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as
+ * ExportPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not
+ * change.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/getallsegments
+ */
+ GetAllSegments(request: PlayFabAdminModels.GetAllSegmentsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/getcatalogitems
+ */
+ GetCatalogItems(request: PlayFabAdminModels.GetCatalogItemsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets the contents and information of a specific Cloud Script revision.
+ * https://docs.microsoft.com/rest/api/playfab/admin/server-side-cloud-script/getcloudscriptrevision
+ */
+ GetCloudScriptRevision(request: PlayFabAdminModels.GetCloudScriptRevisionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get detail information about a CloudScript task instance.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/getcloudscripttaskinstance
+ */
+ GetCloudScriptTaskInstance(request: PlayFabAdminModels.GetTaskInstanceRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Lists all the current cloud script versions. For each version, information about the current published and latest
+ * revisions is also listed.
+ * https://docs.microsoft.com/rest/api/playfab/admin/server-side-cloud-script/getcloudscriptversions
+ */
+ GetCloudScriptVersions(request: PlayFabAdminModels.GetCloudScriptVersionsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * List all contents of the title and get statistics such as size
+ * https://docs.microsoft.com/rest/api/playfab/admin/content/getcontentlist
+ */
+ GetContentList(request: PlayFabAdminModels.GetContentListRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the pre-signed URL for uploading a content file. A subsequent HTTP PUT to the returned URL uploads the
+ * content. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN
+ * rates apply.
+ * https://docs.microsoft.com/rest/api/playfab/admin/content/getcontentuploadurl
+ */
+ GetContentUploadUrl(request: PlayFabAdminModels.GetContentUploadUrlRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves a download URL for the requested report
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getdatareport
+ */
+ GetDataReport(request: PlayFabAdminModels.GetDataReportRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get the list of titles that the player has played
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/getplayedtitlelist
+ */
+ GetPlayedTitleList(request: PlayFabAdminModels.GetPlayedTitleListRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves a title-specific custom property value for a player.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getplayercustomproperty
+ */
+ GetPlayerCustomProperty(request: PlayFabAdminModels.GetPlayerCustomPropertyRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets a player's ID from an auth token.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/getplayeridfromauthtoken
+ */
+ GetPlayerIdFromAuthToken(request: PlayFabAdminModels.GetPlayerIdFromAuthTokenRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the player's profile
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/getplayerprofile
+ */
+ GetPlayerProfile(request: PlayFabAdminModels.GetPlayerProfileRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * List all segments that a player currently belongs to at this moment in time.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/getplayersegments
+ */
+ GetPlayerSegments(request: PlayFabAdminModels.GetPlayersSegmentsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Returns all Player Shared Secret Keys including disabled and expired.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/getplayersharedsecrets
+ */
+ GetPlayerSharedSecrets(request: PlayFabAdminModels.GetPlayerSharedSecretsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have
+ * a reset interval.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getplayerstatisticdefinitions
+ */
+ GetPlayerStatisticDefinitions(request: PlayFabAdminModels.GetPlayerStatisticDefinitionsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the information on the available versions of the specified statistic.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getplayerstatisticversions
+ */
+ GetPlayerStatisticVersions(request: PlayFabAdminModels.GetPlayerStatisticVersionsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get all tags with a given Namespace (optional) from a player profile.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/getplayertags
+ */
+ GetPlayerTags(request: PlayFabAdminModels.GetPlayerTagsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets the requested policy.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/getpolicy
+ */
+ GetPolicy(request: PlayFabAdminModels.GetPolicyRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the key-value store of custom publisher settings
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/getpublisherdata
+ */
+ GetPublisherData(request: PlayFabAdminModels.GetPublisherDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Retrieves the random drop table configuration for the title
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/getrandomresulttables
+ */
+ GetRandomResultTables(request: PlayFabAdminModels.GetRandomResultTablesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the result of an export started by ExportPlayersInSegment API. If the ExportPlayersInSegment is successful and
+ * complete, this API returns the IndexUrl from which the index file can be downloaded. The index file has a list of urls
+ * from which the files containing the player profile data can be downloaded. Otherwise, it returns the current 'State' of
+ * the export
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/getsegmentexport
+ */
+ GetSegmentExport(request: PlayFabAdminModels.GetPlayersInSegmentExportRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Returns the total number of players in a given segment.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/getsegmentplayercount
+ */
+ GetSegmentPlayerCount(request: PlayFabAdminModels.GetSegmentPlayerCountRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get detail information of a segment and its associated definition(s) and action(s) for a title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/segments/getsegments
+ */
+ GetSegments(request: PlayFabAdminModels.GetSegmentsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Retrieves the set of items defined for the specified store, including all prices defined
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/getstoreitems
+ */
+ GetStoreItems(request: PlayFabAdminModels.GetStoreItemsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Query for task instances by task, status, or time range.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/gettaskinstances
+ */
+ GetTaskInstances(request: PlayFabAdminModels.GetTaskInstancesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Get definition information on a specified task or all tasks within a title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/gettasks
+ */
+ GetTasks(request: PlayFabAdminModels.GetTasksRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the key-value store of custom title settings which can be read by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/gettitledata
+ */
+ GetTitleData(request: PlayFabAdminModels.GetTitleDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the key-value store of custom title settings which cannot be read by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/gettitleinternaldata
+ */
+ GetTitleInternalData(request: PlayFabAdminModels.GetTitleDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the relevant details for a specified user, based upon a match against a supplied unique identifier
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/getuseraccountinfo
+ */
+ GetUserAccountInfo(request: PlayFabAdminModels.LookupUserAccountInfoRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Gets all bans for a user.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/getuserbans
+ */
+ GetUserBans(request: PlayFabAdminModels.GetUserBansRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the title-specific custom data for the user which is readable and writable by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserdata
+ */
+ GetUserData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the title-specific custom data for the user which cannot be accessed by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserinternaldata
+ */
+ GetUserInternalData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Retrieves the specified user's current inventory of virtual goods
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/getuserinventory
+ */
+ GetUserInventory(request: PlayFabAdminModels.GetUserInventoryRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the publisher-specific custom data for the user which is readable and writable by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserpublisherdata
+ */
+ GetUserPublisherData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the publisher-specific custom data for the user which cannot be accessed by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserpublisherinternaldata
+ */
+ GetUserPublisherInternalData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the publisher-specific custom data for the user which can only be read by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserpublisherreadonlydata
+ */
+ GetUserPublisherReadOnlyData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves the title-specific custom data for the user which can only be read by the client
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/getuserreadonlydata
+ */
+ GetUserReadOnlyData(request: PlayFabAdminModels.GetUserDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Adds the specified items to the specified user inventories
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/grantitemstousers
+ */
+ GrantItemsToUsers(request: PlayFabAdminModels.GrantItemsToUsersRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Increases the global count for the given scarce resource.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/incrementlimitededitionitemavailability
+ */
+ IncrementLimitedEditionItemAvailability(request: PlayFabAdminModels.IncrementLimitedEditionItemAvailabilityRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Resets the indicated statistic, removing all player entries for it and backing up the old values.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/incrementplayerstatisticversion
+ */
+ IncrementPlayerStatisticVersion(request: PlayFabAdminModels.IncrementPlayerStatisticVersionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves a list of all Open ID Connect providers registered to a title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/listopenidconnection
+ */
+ ListOpenIdConnection(request: PlayFabAdminModels.ListOpenIdConnectionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Retrieves title-specific custom property values for a player.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/listplayercustomproperties
+ */
+ ListPlayerCustomProperties(request: PlayFabAdminModels.ListPlayerCustomPropertiesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Retuns the list of all defined virtual currencies for the title
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/listvirtualcurrencytypes
+ */
+ ListVirtualCurrencyTypes(request: PlayFabAdminModels.ListVirtualCurrencyTypesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Attempts to process an order refund through the original real money payment provider.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/refundpurchase
+ */
+ RefundPurchase(request: PlayFabAdminModels.RefundPurchaseRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag.
+ * https://docs.microsoft.com/rest/api/playfab/admin/playstream/removeplayertag
+ */
+ RemovePlayerTag(request: PlayFabAdminModels.RemovePlayerTagRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Removes one or more virtual currencies from the set defined for the title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/removevirtualcurrencytypes
+ */
+ RemoveVirtualCurrencyTypes(request: PlayFabAdminModels.RemoveVirtualCurrencyTypesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Completely removes all statistics for the specified character, for the current game
+ * https://docs.microsoft.com/rest/api/playfab/admin/characters/resetcharacterstatistics
+ */
+ ResetCharacterStatistics(request: PlayFabAdminModels.ResetCharacterStatisticsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Reset a player's password for a given title.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/resetpassword
+ */
+ ResetPassword(request: PlayFabAdminModels.ResetPasswordRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Completely removes all statistics for the specified user, for the current game
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/resetuserstatistics
+ */
+ ResetUserStatistics(request: PlayFabAdminModels.ResetUserStatisticsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Attempts to resolve a dispute with the original order's payment provider.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-data-management/resolvepurchasedispute
+ */
+ ResolvePurchaseDispute(request: PlayFabAdminModels.ResolvePurchaseDisputeRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Revoke all active bans for a user.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/revokeallbansforuser
+ */
+ RevokeAllBansForUser(request: PlayFabAdminModels.RevokeAllBansForUserRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Revoke all active bans specified with BanId.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/revokebans
+ */
+ RevokeBans(request: PlayFabAdminModels.RevokeBansRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Revokes access to an item in a user's inventory
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/revokeinventoryitem
+ */
+ RevokeInventoryItem(request: PlayFabAdminModels.RevokeInventoryItemRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Revokes access for up to 25 items across multiple users and characters.
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/revokeinventoryitems
+ */
+ RevokeInventoryItems(request: PlayFabAdminModels.RevokeInventoryItemsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Run a task immediately regardless of its schedule.
+ * https://docs.microsoft.com/rest/api/playfab/admin/scheduledtask/runtask
+ */
+ RunTask(request: PlayFabAdminModels.RunTaskRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to
+ * change the password.If an account recovery email template ID is provided, an email using the custom email template will
+ * be used.
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/sendaccountrecoveryemail
+ */
+ SendAccountRecoveryEmail(request: PlayFabAdminModels.SendAccountRecoveryEmailRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Creates the catalog configuration of all virtual goods for the specified catalog version
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/setcatalogitems
+ */
+ SetCatalogItems(request: PlayFabAdminModels.UpdateCatalogItemsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Sets the override expiration for a membership subscription
+ * https://docs.microsoft.com/rest/api/playfab/admin/account-management/setmembershipoverride
+ */
+ SetMembershipOverride(request: PlayFabAdminModels.SetMembershipOverrideRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Sets or resets the player's secret. Player secrets are used to sign API requests.
+ * https://docs.microsoft.com/rest/api/playfab/admin/authentication/setplayersecret
+ */
+ SetPlayerSecret(request: PlayFabAdminModels.SetPlayerSecretRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Sets the currently published revision of a title Cloud Script
+ * https://docs.microsoft.com/rest/api/playfab/admin/server-side-cloud-script/setpublishedrevision
+ */
+ SetPublishedRevision(request: PlayFabAdminModels.SetPublishedRevisionRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Updates the key-value store of custom publisher settings
+ * https://docs.microsoft.com/rest/api/playfab/admin/shared-group-data/setpublisherdata
+ */
+ SetPublisherData(request: PlayFabAdminModels.SetPublisherDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Sets all the items in one virtual store
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/setstoreitems
+ */
+ SetStoreItems(request: PlayFabAdminModels.UpdateStoreItemsRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Creates and updates the key-value store of custom title settings which can be read by the client. For example, a
+ * developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths,
+ * movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new
+ * build.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/settitledata
+ */
+ SetTitleData(request: PlayFabAdminModels.SetTitleDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Set and delete key-value pairs in a title data override instance.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/settitledataandoverrides
+ */
+ SetTitleDataAndOverrides(request: PlayFabAdminModels.SetTitleDataAndOverridesRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Updates the key-value store of custom title settings which cannot be read by the client. These values can be used to
+ * tweak settings used by game servers and Cloud Scripts without the need to update and re-deploy.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/settitleinternaldata
+ */
+ SetTitleInternalData(request: PlayFabAdminModels.SetTitleDataRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * Sets the Amazon Resource Name (ARN) for iOS and Android push notifications. Documentation on the exact restrictions can
+ * be found at: http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html. Currently, Amazon device
+ * Messaging is not supported.
+ * https://docs.microsoft.com/rest/api/playfab/admin/title-wide-data-management/setuppushnotification
+ */
+ SetupPushNotification(request: PlayFabAdminModels.SetupPushNotificationRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise>;
+ /**
+ * _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for
+ * version 2._ Decrements the specified virtual currency by the stated amount
+ * https://docs.microsoft.com/rest/api/playfab/admin/player-item-management/subtractuservirtualcurrency
+ */
+ SubtractUserVirtualCurrency(request: PlayFabAdminModels.SubtractUserVirtualCurrencyRequest, callback: PlayFabModule.ApiCallback, customData?: any, extraHeaders?: { [key: string]: string }): Promise