Package com.bitheads.braincloud.services
Class GlobalStatisticsService
java.lang.Object
com.bitheads.braincloud.services.GlobalStatisticsService
public class GlobalStatisticsService extends Object
-
Constructor Summary
Constructors Constructor Description GlobalStatisticsService(BrainCloudClient client) -
Method Summary
Modifier and Type Method Description voidincrementGlobalStats(String jsonData, IServerCallback callback)Atomically increment (or decrement) global statistics.voidprocessStatistics(String jsonData, IServerCallback callback)Apply statistics grammar to a partial set of statistics.voidreadAllGlobalStats(IServerCallback callback)Method returns all of the global statistics.voidreadGlobalStatsForCategory(String category, IServerCallback callback)Method retrieves the global statistics for the given category.voidreadGlobalStatsSubset(String[] globalStats, IServerCallback callback)Reads a subset of global statistics.
-
Constructor Details
-
GlobalStatisticsService
-
-
Method Details
-
readAllGlobalStats
Method returns all of the global statistics.- Parameters:
callback- The callback.
-
readGlobalStatsSubset
Reads a subset of global statistics.- Parameters:
globalStats- The array of statistics to read: [ "Level01_TimesBeaten", "Level02_TimesBeaten" ]callback- The callback.
-
readGlobalStatsForCategory
Method retrieves the global statistics for the given category. Service Name - GlobalStatistics Service Operation - READ_FOR_CATEGORY- Parameters:
category- The global statistics categorycallback- Callback.
-
incrementGlobalStats
Atomically increment (or decrement) global statistics. Global statistics are defined through the brainCloud portal.- Parameters:
jsonData- The JSON encoded data to be sent to the server.For the full statistics grammer see the http://getbraincloud.com/apidocs site.callback- The callback.
-
processStatistics
Apply statistics grammar to a partial set of statistics. Service Name - GlobalStatistics Service Operation - PROCESS_STATISTICS- Parameters:
jsonData- The JSON format is as follows: { "DEAD_CATS": "RESET", "LIVES_LEFT": "SET#9", "MICE_KILLED": "INC#2", "DOG_SCARE_BONUS_POINTS": "INC#10", "TREES_CLIMBED": 1 }callback- Method to be invoked when the server response is received.
-