Package com.bitheads.braincloud.services
Class GamificationService
java.lang.Object
com.bitheads.braincloud.services.GamificationService
public class GamificationService extends Object
-
Field Summary
Fields Modifier and Type Field Description IAchievementsDelegatem_achievementsDelegate -
Constructor Summary
Constructors Constructor Description GamificationService(BrainCloudClient client) -
Method Summary
Modifier and Type Method Description voidawardAchievements(String[] achievementIds, IServerCallback callback)Method will award the achievements specified.voidcheckForAchievementsToAward(ServiceName serviceName, ServiceOperation serviceOperation, String data)voidreadAchievedAchievements(boolean includeMetaData, IServerCallback callback)Method retrives the list of achieved achievements.voidreadAchievements(boolean includeMetaData, IServerCallback callback)Read all of the achievements defined for the game.voidreadAllGamification(boolean includeMetaData, IServerCallback callback)Method retrieves all gamification data for the player.voidreadCompletedMilestones(boolean includeMetaData, IServerCallback callback)Method retrieves the list of completed milestones.voidreadInProgressMilestones(boolean includeMetaData, IServerCallback callback)Method retrieves the list of in progress milestones Service Name - Gamification Service Operation - ReadInProgressMilestonesvoidreadMilestones(boolean includeMetaData, IServerCallback callback)Method retrieves all milestones defined for the game.voidreadMilestonesByCategory(String category, boolean includeMetaData, IServerCallback callback)Method retrieves milestones of the given category.voidreadQuests(boolean includeMetaData, IServerCallback callback)Method retrieves all of the quests defined for the game.voidreadQuestsByCategory(String category, boolean includeMetaData, IServerCallback callback)Method Service Name - Gamification Service Operation - ReadQuestsByCategoryvoidreadQuestsCompleted(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadCompletedQuestsvoidreadQuestsInProgress(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadInProgressQuestsvoidreadQuestsNotStarted(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadNotStartedQuestsvoidreadQuestsWithBasicPercentage(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadQuestsWithBasicPercentagevoidreadQuestsWithComplexPercentage(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadQuestsWithComplexPercentagevoidreadQuestsWithStatus(boolean includeMetaData, IServerCallback callback)Service Name - Gamification Service Operation - ReadQuestsWithStatusvoidreadXpLevels(IServerCallback callback)Method returns all defined xp levels and any rewards associated with those xp levels.voidsetAchievementAwardedDelegate(IAchievementsDelegate delegate)Sets the achievement awarded delegate which is called anytime an achievement is awarded
-
Field Details
-
m_achievementsDelegate
-
-
Constructor Details
-
GamificationService
-
-
Method Details
-
setAchievementAwardedDelegate
Sets the achievement awarded delegate which is called anytime an achievement is awarded- Parameters:
delegate- Achievement awarded delegate
-
readAllGamification
Method retrieves all gamification data for the player. Service Name - Gamification Service Operation - Read- Parameters:
includeMetaData- Whether to return meta data as wellcallback- The callback handler
-
readMilestones
Method retrieves all milestones defined for the game. Service Name - Gamification Service Operation - ReadMilestones- Parameters:
includeMetaData- Whether to return meta data as wellcallback- The callback handler
-
readAchievements
Read all of the achievements defined for the game. Service Name - Gamification Service Operation - ReadAchievements- Parameters:
includeMetaData- Whether to return meta data as wellcallback- The callback handler
-
readXpLevels
Method returns all defined xp levels and any rewards associated with those xp levels. Service Name - Gamification Service Operation - ReadXpLevels- Parameters:
callback- Callback.
-
readAchievedAchievements
Method retrives the list of achieved achievements. Service Name - Gamification Service Operation - ReadAchievedAchievements- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readCompletedMilestones
Method retrieves the list of completed milestones. Service Name - Gamification Service Operation - ReadCompleteMilestones- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readInProgressMilestones
Method retrieves the list of in progress milestones Service Name - Gamification Service Operation - ReadInProgressMilestones- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readMilestonesByCategory
public void readMilestonesByCategory(String category, boolean includeMetaData, IServerCallback callback)Method retrieves milestones of the given category. Service Name - Gamification Service Operation - ReadMilestonesByCategory- Parameters:
category- The milestone categoryincludeMetaData- Whether to return meta data as wellcallback- Callback.
-
awardAchievements
Method will award the achievements specified. On success, this will call AwardThirdPartyAchievement to hook into the client-side Achievement service (ie GameCentre, Facebook etc). Service Name - Gamification Service Operation - AwardAchievements- Parameters:
achievementIds- Array of achievement ids to awardcallback- Callback.
-
checkForAchievementsToAward
public void checkForAchievementsToAward(ServiceName serviceName, ServiceOperation serviceOperation, String data) -
readQuests
Method retrieves all of the quests defined for the game. Service Name - Gamification Service Operation - ReadQuests- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback. { "status": 200, "data": { "quests": [] } }
-
readQuestsCompleted
Service Name - Gamification Service Operation - ReadCompletedQuests- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readQuestsInProgress
Service Name - Gamification Service Operation - ReadInProgressQuests- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readQuestsNotStarted
Service Name - Gamification Service Operation - ReadNotStartedQuests- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readQuestsWithStatus
Service Name - Gamification Service Operation - ReadQuestsWithStatus- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readQuestsWithBasicPercentage
Service Name - Gamification Service Operation - ReadQuestsWithBasicPercentage- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback.
-
readQuestsWithComplexPercentage
Service Name - Gamification Service Operation - ReadQuestsWithComplexPercentage- Parameters:
includeMetaData- Whether to return meta data as wellcallback- Callback
-
readQuestsByCategory
public void readQuestsByCategory(String category, boolean includeMetaData, IServerCallback callback)Method Service Name - Gamification Service Operation - ReadQuestsByCategory- Parameters:
category- The quest categoryincludeMetaData- Whether to return meta data as wellcallback- Callback.
-