Skip to content

Commit

Permalink
Merge pull request #134 from davidstl/develop
Browse files Browse the repository at this point in the history
More deprecated forgotten
  • Loading branch information
davidstl authored Nov 10, 2020
2 parents c8c02bf + c5761c7 commit 3266549
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
16 changes: 8 additions & 8 deletions src/brainCloudClient-player-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,6 @@ function BCPlayerState() {
});
};

/**
* @deprecated Use updateName instead - Will be removed after October 21 2021
*/
bc.playerState.updateUserName = function(name, callback) {
bc.playerState.updateName(name, callback);
};

/**
* Sets the user name.
*
Expand All @@ -238,7 +231,7 @@ function BCPlayerState() {
* @param name The name of the user
* @param callback The method to be invoked when the server response is received
*/
bc.playerState.updateName = function(name, callback) {
bc.playerState.updateUserName = function(name, callback) {
bc.brainCloudManager.sendRequest({
service : bc.SERVICE_PLAYERSTATE,
operation : bc.playerState.OPERATION_UPDATE_NAME,
Expand All @@ -249,6 +242,13 @@ function BCPlayerState() {
});
};

/**
* @deprecated Use updateUserName instead - Will be removed after October 21 2021
*/
bc.playerState.updateName = function(name, callback) {
bc.playerState.updateUserName(name, callback);
};



/**
Expand Down
34 changes: 31 additions & 3 deletions src/brainCloudClient-player-statistics-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ function BCPlayerStatisticsEvent() {
bc.playerStatisticsEvent.OPERATION_TRIGGER = "TRIGGER";
bc.playerStatisticsEvent.OPERATION_TRIGGER_MULTIPLE = "TRIGGER_MULTIPLE";

/**
* @deprecated Use triggerStatsEvent instead - Removal September 1, 2021
*/
bc.playerStatisticsEvent.triggerUserStatsEvent = function(eventName, eventMultiplier, callback) {
bc.brainCloudManager.sendRequest({
service: bc.SERVICE_PLAYER_STATISTICS_EVENT,
operation: bc.playerStatisticsEvent.OPERATION_TRIGGER,
data: {
eventName : eventName,
eventMultiplier : eventMultiplier
},
callback: callback
});
};

/**
* Trigger an event server side that will increase the users statistics.
* This may cause one or more awards to be sent back to the user -
Expand All @@ -26,7 +41,7 @@ function BCPlayerStatisticsEvent() {
*
* @param callback The method to be invoked when the server response is received
*/
bc.playerStatisticsEvent.triggerUserStatsEvent = function(eventName, eventMultiplier, callback) {
bc.playerStatisticsEvent.triggerStatsEvent = function(eventName, eventMultiplier, callback) {
bc.brainCloudManager.sendRequest({
service: bc.SERVICE_PLAYER_STATISTICS_EVENT,
operation: bc.playerStatisticsEvent.OPERATION_TRIGGER,
Expand All @@ -38,6 +53,20 @@ function BCPlayerStatisticsEvent() {
});
};

/**
* @deprecated Use triggerStatsEvents instead - Removal September 1, 2021
*/
bc.playerStatisticsEvent.triggerUserStatsEvents = function(events, callback) {
bc.brainCloudManager.sendRequest({
service: bc.SERVICE_PLAYER_STATISTICS_EVENT,
operation: bc.playerStatisticsEvent.OPERATION_TRIGGER_MULTIPLE,
data: {
events : events
},
callback: callback
});
};

/**
* Service Name - PlayerStatisticsEvent
* Service Operation - TriggerMultiple
Expand All @@ -54,7 +83,7 @@ function BCPlayerStatisticsEvent() {
* }
* ]
*/
bc.playerStatisticsEvent.triggerUserStatsEvents = function(events, callback) {
bc.playerStatisticsEvent.triggerStatsEvents = function(events, callback) {
bc.brainCloudManager.sendRequest({
service: bc.SERVICE_PLAYER_STATISTICS_EVENT,
operation: bc.playerStatisticsEvent.OPERATION_TRIGGER_MULTIPLE,
Expand All @@ -64,7 +93,6 @@ function BCPlayerStatisticsEvent() {
callback: callback
});
};

}

BCPlayerStatisticsEvent.apply(window.brainCloudClient = window.brainCloudClient || {});
11 changes: 1 addition & 10 deletions src/brainCloudClient-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,7 @@ function BCScript() {
};

/**
* Allows cloud script executions to be scheduled
*
* Service Name - Script
* Service Operation - ScheduleCloudScript
*
* @param scriptName The name of the script to be run
* @param scriptData Data to be sent to the script in json format
* @param startDateInUTC A date Object representing the time and date to run the script
* @param callback The method to be invoked when the server response is received
* @see The API documentation site for more details on cloud code
* @deprecated Use ScheduleRunScriptMillisUTC instead - Removal September 1, 2021
*/
bc.script.scheduleRunScriptUTC = function(scriptName, scriptData, startDateInUTC, callback) {
bc.brainCloudManager.sendRequest({
Expand Down

0 comments on commit 3266549

Please sign in to comment.