Skip to content

Commit 1375175

Browse files
author
Paul Gilmore
committed
Merge pull request #52 from PlayFab/master
PlayStream versioned build
2 parents cc7f4b0 + d3cc7a5 commit 1375175

File tree

5 files changed

+44
-15
lines changed

5 files changed

+44
-15
lines changed

PlayFabApiTest.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -563,23 +563,16 @@ var PlayFabApiTests = {
563563

564564
/// <summary>
565565
/// CLIENT API
566-
/// Try to deliberately register a character with an invalid email and password.
567-
/// Verify that errorDetails are populated correctly.
566+
/// Test that the client can publish custom PlayStream events
568567
/// </summary>
569568
WriteEvent: function (assert) {
570569
var writeEventDone = assert.async();
571570

572571
var writeEventRequest = {
573572
// Currently, you need to look up the correct format for this object in the API-docs:
574-
// https://api.playfab.com/Documentation/Client/method/WriteEvent
575-
"Event": {
576-
"EventName": "forum_post_event",
577-
"EventNamespace": "com.mygame.forums",
578-
"EntityType": "player",
579-
"Timestamp": "2014-03-07T00:00:00Z", // TODO: Write a current timestamp-string in the correct format
580-
"CustomTags": {
581-
"Region": "US-East"
582-
},
573+
// https://api.playfab.com/Documentation/Client/method/WritePlayerEvent
574+
"EventName": "ForumPostEvent",
575+
"Body": {
583576
"Subject": "My First Post",
584577
"Body": "This is my awesome post."
585578
}

PlayFabSDK/PlayFabAdminApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(!PlayFab.settings) {
1818
if(!PlayFab._internalSettings) {
1919
PlayFab._internalSettings = {
2020
sessionTicket: null,
21-
sdkVersion: "0.14.160411",
21+
sdkVersion: "0.15.160414",
2222
productionServerUrl: ".playfabapi.com",
2323
logicServerUrl: null,
2424

PlayFabSDK/PlayFabClientApi.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(!PlayFab.settings) {
1818
if(!PlayFab._internalSettings) {
1919
PlayFab._internalSettings = {
2020
sessionTicket: null,
21-
sdkVersion: "0.14.160411",
21+
sdkVersion: "0.15.160414",
2222
productionServerUrl: ".playfabapi.com",
2323
logicServerUrl: null,
2424

@@ -719,6 +719,24 @@ PlayFab.ClientApi = {
719719
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/LogEvent", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
720720
},
721721

722+
WriteCharacterEvent: function (request, callback) {
723+
if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
724+
725+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/WriteCharacterEvent", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
726+
},
727+
728+
WritePlayerEvent: function (request, callback) {
729+
if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
730+
731+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/WritePlayerEvent", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
732+
},
733+
734+
WriteTitleEvent: function (request, callback) {
735+
if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
736+
737+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Client/WriteTitleEvent", request, "X-Authorization", PlayFab._internalSettings.sessionTicket, callback);
738+
},
739+
722740
AddSharedGroupMembers: function (request, callback) {
723741
if (PlayFab._internalSettings.sessionTicket == null) throw "Must be logged in to call this method";
724742

PlayFabSDK/PlayFabMatchmakerApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(!PlayFab.settings) {
1818
if(!PlayFab._internalSettings) {
1919
PlayFab._internalSettings = {
2020
sessionTicket: null,
21-
sdkVersion: "0.14.160411",
21+
sdkVersion: "0.15.160414",
2222
productionServerUrl: ".playfabapi.com",
2323
logicServerUrl: null,
2424

PlayFabSDK/PlayFabServerApi.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(!PlayFab.settings) {
1818
if(!PlayFab._internalSettings) {
1919
PlayFab._internalSettings = {
2020
sessionTicket: null,
21-
sdkVersion: "0.14.160411",
21+
sdkVersion: "0.15.160414",
2222
productionServerUrl: ".playfabapi.com",
2323
logicServerUrl: null,
2424

@@ -446,6 +446,24 @@ PlayFab.ServerApi = {
446446
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/LogEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
447447
},
448448

449+
WriteCharacterEvent: function (request, callback) {
450+
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
451+
452+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WriteCharacterEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
453+
},
454+
455+
WritePlayerEvent: function (request, callback) {
456+
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
457+
458+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WritePlayerEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
459+
},
460+
461+
WriteTitleEvent: function (request, callback) {
462+
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
463+
464+
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WriteTitleEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
465+
},
466+
449467
AddSharedGroupMembers: function (request, callback) {
450468
if (PlayFab.settings.developerSecretKey == null) throw "Must have PlayFab.settings.developerSecretKey set to call this method";
451469

0 commit comments

Comments
 (0)