|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.game.RewardService
public class RewardService
Define a Reward e.g. Sword, Energy etc. Is needed for Reward Points The Game service allows Game, User, Score and ScoreBoard Management on the Cloud. The service allows Game Developer to create a Game and then do in Game Scoring using the Score service. It also allows to maintain a Scoreboard across game sessions using the ScoreBoard service. One can query for average or highest score for user for a Game and highest and average score across users for a Game. It also gives ranking of the user against other users for a particular game. The Reward and RewardPoints allows the Game Developer to assign rewards to a user and redeem the rewards. E.g. One can give Swords or Energy etc. The services Game, Score, ScoreBoard, Reward, RewardPoints can be used in Conjunction for complete Game Scoring and Reward Management.
Game, RewardPoint, Score, ScoreBoard
Constructor Summary | |
---|---|
RewardService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
this is a constructor that takes |
Method Summary | |
---|---|
Reward |
createReward(java.lang.String rewardName,
java.lang.String rewardDescription)
Creates Reward. |
Reward |
earnRewards(java.lang.String gameName,
java.lang.String gameUserName,
java.lang.String rewardName,
double rewardPoints)
Adds the reward points to an users account. |
java.util.Vector |
getAllRewards()
Fetches all the Rewards |
java.util.Vector |
getAllRewards(java.lang.Integer max,
java.lang.Integer offset)
Fetches all the Rewards by paging. |
App42Response |
getAllRewardsCount()
Fetches the count of all the Rewards |
Reward |
getGameRewardPointsForUser(java.lang.String gameName,
java.lang.String userName)
Fetches the reward points for a particular user |
Reward |
getRewardByName(java.lang.String rewardName)
Retrieves the reward for the specified name |
Reward |
redeemRewards(java.lang.String gameName,
java.lang.String gameUserName,
java.lang.String rewardName,
double rewardPoints)
Deducts the reward points from the earned rewards by a user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RewardService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public Reward createReward(java.lang.String rewardName, java.lang.String rewardDescription) throws App42Exception
rewardName
- - The reward that has to be createdrewardDescription
- - The description of the reward to be created
App42Exception
public Reward earnRewards(java.lang.String gameName, java.lang.String gameUserName, java.lang.String rewardName, double rewardPoints) throws App42Exception
gameName
- - Name of the game for which reward points have to be addedgameUserName
- - The user for whom reward points have to be addedrewardName
- - The rewards for which reward points have to be addedrewardPoints
- - The points that have to be added
App42Exception
public java.util.Vector getAllRewards() throws App42Exception
App42Exception
public java.util.Vector getAllRewards(java.lang.Integer max, java.lang.Integer offset) throws App42Exception
max
- - Maximum number of records to be fetchedoffset
- - From where the records are to be fetched
App42Exception
public App42Response getAllRewardsCount() throws App42Exception
App42Exception
public Reward getGameRewardPointsForUser(java.lang.String gameName, java.lang.String userName) throws App42Exception
gameName
- - Name of the game for which reward points have to be fetcheduserName
- - The user for whom reward points have to be fetched
App42Exception
public Reward getRewardByName(java.lang.String rewardName) throws App42Exception
rewardName
- - Name of the reward that has to be fetched
App42Exception
public Reward redeemRewards(java.lang.String gameName, java.lang.String gameUserName, java.lang.String rewardName, double rewardPoints) throws App42Exception
gameName
- - Name of the game for which reward points have to be deductedgameUserName
- - The user for whom reward points have to be deductedrewardName
- - The rewards for which reward points have to be deductedrewardPoints
- - The points that have to be deducted
App42Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |