From 19520ee0839297de738417d5a64b36ad55ab3dda Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Mon, 8 Feb 2016 19:11:40 +0000 Subject: [PATCH 1/3] Automated build from Jenkins --- PlayFabSDK/PlayFabClientApi.js | 6 ++++++ PlayFabSDK/PlayFabServerApi.js | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/PlayFabSDK/PlayFabClientApi.js b/PlayFabSDK/PlayFabClientApi.js index 95c3151d..5a9d4446 100644 --- a/PlayFabSDK/PlayFabClientApi.js +++ b/PlayFabSDK/PlayFabClientApi.js @@ -657,6 +657,12 @@ PlayFab.ClientApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/SubtractUserVirtualCurrency", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback); }, + UnlockContainerInstance: function (request, callback) { + if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method"; + + PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/UnlockContainerInstance", 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"; diff --git a/PlayFabSDK/PlayFabServerApi.js b/PlayFabSDK/PlayFabServerApi.js index 5ebc2323..be0d04c4 100644 --- a/PlayFabSDK/PlayFabServerApi.js +++ b/PlayFabSDK/PlayFabServerApi.js @@ -368,6 +368,18 @@ PlayFab.ServerApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SubtractUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); }, + UnlockContainerInstance: 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/UnlockContainerInstance", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); + }, + + UnlockContainerItem: 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/UnlockContainerItem", 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"; From 2040c6b9406b1f87ca4d44b79111b72ccdd2055a Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Wed, 10 Feb 2016 00:37:59 +0000 Subject: [PATCH 2/3] Automated build from Jenkins --- PlayFabApiTest.js | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/PlayFabApiTest.js b/PlayFabApiTest.js index 4479176b..9cfcf720 100644 --- a/PlayFabApiTest.js +++ b/PlayFabApiTest.js @@ -1,7 +1,7 @@ if (typeof PlayFabClientSDK == 'undefined') - Console.error("PlayFabApiTest requires PlayFabClientApi.js to be pre-loaded."); + console.log("PlayFabApiTest requires PlayFabClientApi.js to be pre-loaded."); if (typeof PlayFabServerSDK == 'undefined') - Console.error("PlayFabApiTest requires PlayFabServerApi.js to be pre-loaded."); + console.log("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) @@ -45,7 +45,6 @@ var PlayFabApiTests = { QUnit.test("LoginWithAdvertisingId", PlayFabApiTests.LoginWithAdvertisingId); setTimeout(function () { PlayFabApiTests.PostLoginTests(0); }, 200); - setTimeout(function () { PlayFabApiTests.PostCharacterTests(0); }, 200); }, PostLoginTests: function (count) { @@ -60,23 +59,12 @@ var PlayFabApiTests = { QUnit.test("UserDataApi", PlayFabApiTests.UserDataApi); QUnit.test("UserStatisticsApi", PlayFabApiTests.UserStatisticsApi); QUnit.test("UserCharacter", PlayFabApiTests.UserCharacter); + QUnit.test("LeaderBoard", PlayFabApiTests.LeaderBoard); 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 @@ -90,7 +78,7 @@ var PlayFabApiTests = { if (titleDataValid) PlayFabApiTests.titleData = inputTitleData; else - window.console.error("testTitleData input file did not parse correctly"); + console.log("testTitleData input file did not parse correctly"); PlayFab.settings.titleId = PlayFabApiTests.titleData.titleId; PlayFab.settings.developerSecretKey = PlayFabApiTests.titleData.developerSecretKey; @@ -103,7 +91,7 @@ var PlayFabApiTests = { 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 + console.log("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); } }; @@ -114,7 +102,7 @@ var PlayFabApiTests = { try { Callback(); } 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 + console.log("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); } }; @@ -411,34 +399,32 @@ var PlayFabApiTests = { }; var serverRequest = { MaxResultsCount: 3, - PlayFabId: PlayFabApiTests.testData.playFabId, - CharacterId: PlayFabApiTests.testData.characterId, StatisticName: PlayFabApiTests.testConstants.TEST_STAT_NAME, }; + var lbDoneC = assert.async(); + var lbDoneS = assert.async(); - var GetLeaderboardCallback_C = function (result, error) { + var getLeaderboardCallbackC = 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(); + lbDoneC(); }; - var GetLeaderboardCallback_S = function (result, error) { + var getLeaderboardCallbackS = 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(); + lbDoneS(); }; - 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)); + PlayFabClientSDK.GetLeaderboard(clientRequest, PlayFabApiTests.CallbackWrapper("getLeaderboardCallbackC", getLeaderboardCallbackC, assert)); + PlayFabServerSDK.GetLeaderboard(serverRequest, PlayFabApiTests.CallbackWrapper("getLeaderboardCallbackS", getLeaderboardCallbackS, assert)); }, /// From 3833217a829d40ec75e9b1862e5b72960696c822 Mon Sep 17 00:00:00 2001 From: Playfab Jenkins Bot Date: Fri, 12 Feb 2016 00:27:48 +0000 Subject: [PATCH 3/3] Automated build from Jenkins --- PlayFabSDK/PlayFabAdminApi.js | 30 ++++++++++++++++++++++++++++++ PlayFabSDK/PlayFabClientApi.js | 12 ++++++++++++ 2 files changed, 42 insertions(+) diff --git a/PlayFabSDK/PlayFabAdminApi.js b/PlayFabSDK/PlayFabAdminApi.js index ac60aec5..1a97b280 100644 --- a/PlayFabSDK/PlayFabAdminApi.js +++ b/PlayFabSDK/PlayFabAdminApi.js @@ -128,6 +128,12 @@ PlayFab.AdminApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserTitleDisplayName", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); }, + CreatePlayerStatisticDefinition: 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/CreatePlayerStatisticDefinition", 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"; @@ -140,6 +146,18 @@ PlayFab.AdminApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetDataReport", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); }, + GetPlayerStatisticDefinitions: 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/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); + }, + + GetPlayerStatisticVersions: 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/GetPlayerStatisticVersions", 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"; @@ -176,12 +194,24 @@ PlayFab.AdminApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback); }, + IncrementPlayerStatisticVersion: 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/IncrementPlayerStatisticVersion", 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); }, + UpdatePlayerStatisticDefinition: 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/UpdatePlayerStatisticDefinition", 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"; diff --git a/PlayFabSDK/PlayFabClientApi.js b/PlayFabSDK/PlayFabClientApi.js index 5a9d4446..97d353be 100644 --- a/PlayFabSDK/PlayFabClientApi.js +++ b/PlayFabSDK/PlayFabClientApi.js @@ -513,6 +513,12 @@ PlayFab.ClientApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/GetLeaderboardAroundPlayer", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback); }, + GetPlayerStatistics: function (request, callback) { + if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method"; + + PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/GetPlayerStatistics", 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"; @@ -543,6 +549,12 @@ PlayFab.ClientApi = { PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/GetUserStatistics", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback); }, + UpdatePlayerStatistics: function (request, callback) { + if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method"; + + PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/UpdatePlayerStatistics", 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";