Skip to content

Commit

Permalink
https://api.playfab.com/releaseNotes/#161003
Browse files Browse the repository at this point in the history
  • Loading branch information
Playfab Jenkins Bot committed Oct 3, 2016
2 parents e47cacb + e44ddca commit 51fe47f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
10 changes: 3 additions & 7 deletions PlayFabApiTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ var PlayFabApiTests = {
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"
userEmail: "put valid email associated with an existing account here",
characterName: "put any character name here"
},
testData: {
playFabId: null, // Filled during login
Expand Down Expand Up @@ -81,9 +79,7 @@ var PlayFabApiTests = {
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)
Expand Down Expand Up @@ -151,7 +147,7 @@ var PlayFabApiTests = {
// https://api.playfab.com/Documentation/Client/method/LoginWithEmailAddress
TitleId: PlayFab.settings.titleId,
Email: PlayFabApiTests.titleData.userEmail,
Password: PlayFabApiTests.titleData.userPassword + "INVALID"
Password: "INVALID"
};

var invalidLoginCallback = function (result, error) {
Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/PlayFabAdminApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if(!PlayFab.settings) {
if(!PlayFab._internalSettings) {
PlayFab._internalSettings = {
sessionTicket: null,
sdkVersion: "0.30.160919",
buildIdentifier: "jbuild_javascriptsdk_0",
sdkVersion: "0.31.161003",
buildIdentifier: "jbuild_javascriptsdk_1",
productionServerUrl: ".playfabapi.com",
logicServerUrl: null,

Expand Down
10 changes: 8 additions & 2 deletions PlayFabSDK/PlayFabClientApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if(!PlayFab.settings) {
if(!PlayFab._internalSettings) {
PlayFab._internalSettings = {
sessionTicket: null,
sdkVersion: "0.30.160919",
buildIdentifier: "jbuild_javascriptsdk_0",
sdkVersion: "0.31.161003",
buildIdentifier: "jbuild_javascriptsdk_1",
productionServerUrl: ".playfabapi.com",
logicServerUrl: null,

Expand Down Expand Up @@ -622,6 +622,12 @@ PlayFab.ClientApi = {
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/GetStoreItems", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
},

GetTime: function (request, callback) {
if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";

PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/GetTime", 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";

Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/PlayFabMatchmakerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if(!PlayFab.settings) {
if(!PlayFab._internalSettings) {
PlayFab._internalSettings = {
sessionTicket: null,
sdkVersion: "0.30.160919",
buildIdentifier: "jbuild_javascriptsdk_0",
sdkVersion: "0.31.161003",
buildIdentifier: "jbuild_javascriptsdk_1",
productionServerUrl: ".playfabapi.com",
logicServerUrl: null,

Expand Down
10 changes: 8 additions & 2 deletions PlayFabSDK/PlayFabServerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if(!PlayFab.settings) {
if(!PlayFab._internalSettings) {
PlayFab._internalSettings = {
sessionTicket: null,
sdkVersion: "0.30.160919",
buildIdentifier: "jbuild_javascriptsdk_0",
sdkVersion: "0.31.161003",
buildIdentifier: "jbuild_javascriptsdk_1",
productionServerUrl: ".playfabapi.com",
logicServerUrl: null,

Expand Down Expand Up @@ -316,6 +316,12 @@ PlayFab.ServerApi = {
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
},

GetTime: 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/GetTime", 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";

Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,10 @@ This SDK can alternatively be obtained via our CDN. Additional details can be fo
4. testTitleData.json file required for example test files.
----

This sdk includes an optional example project that is used by PlayFab to verify sdk features are fully functional. The testTitleData.json file provides your secret title information to the unit-test project, so it can execute tests in your own PlayFab title.

The format is as follows:

{
"titleId": "your Game Title ID, found in the settings/credentials section of your dashboard on the website",
"developerSecretKey": "your PlayFab API Secret Key, found in the settings/credentials section of your dashboard on the website - NEVER SHARE THIS KEY WITH PLAYERS",
"titleCanUpdateSettings": "false", // "true" or "false", based on your Allow Client to Post Player Statistics option, found in the settings/general section of your dashboard on the website
"userName": "testUser", // Arbitrary username, you can change this to any valid username
"userEmail": "[email protected]", // This email address will be bound to the username above
"userPassword": "testPassword", // This must be the correct password for the testUser above (if that user does not exist yet, this will be the new password)
"characterName": "testCharacter" // Arbitrary characterName, you can change this to any valid characterName
}
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:
* https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/testTitleData.md
This file must be created and placed in the root of the sdk (beside PlayFabApiTest.html & PlayFabApiTest.js), and must be named "testTitleData.json"


Expand Down

0 comments on commit 51fe47f

Please sign in to comment.