com.shephertz.app42.paas.sdk.jme.game
Class GameService

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.game.GameService

public class GameService
extends java.lang.Object

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 Score board 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.

See Also:
Reward, RewardPoint, Score, ScoreBoard

Constructor Summary
GameService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
          this is a constructor that takes
 
Method Summary
 Game createGame(java.lang.String gameName, java.lang.String gameDescription)
          Creates a game on the cloud
 java.util.Vector getAllGames()
          Fetches all games for the App
 java.util.Vector getAllGames(java.lang.Integer max, java.lang.Integer offset)
          Fetches all games for the App by paging.
 App42Response getAllGamesCount()
          Fetches the count of all games for the App
 Game getGameByName(java.lang.String gameName)
          Retrieves the game by the specified name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameService

public GameService(java.lang.String apiKey,
                   java.lang.String secretKey,
                   java.lang.String baseURL)
this is a constructor that takes

Parameters:
apiKey -
secretKey -
baseURL -
Method Detail

createGame

public Game createGame(java.lang.String gameName,
                       java.lang.String gameDescription)
                throws App42Exception
Creates a game on the cloud

Parameters:
gameName - - Name of the game that has to be created
gameDescription - - Description of the game to be created
Returns:
Game object containing the game which has been created
Throws:
App42Exception

getAllGames

public java.util.Vector getAllGames()
                             throws App42Exception
Fetches all games for the App

Returns:
List of Game object containing all the games for the App
Throws:
App42Exception

getAllGames

public java.util.Vector getAllGames(java.lang.Integer max,
                                    java.lang.Integer offset)
                             throws App42Exception
Fetches all games for the App by paging.

Parameters:
max - - Maximum number of records to be fetched
offset - - From where the records are to be fetched
Returns:
List of Game object containing all the games for the App
Throws:
App42Exception

getAllGamesCount

public App42Response getAllGamesCount()
                               throws App42Exception
Fetches the count of all games for the App

Returns:
App42Response object containing count of all the Game for the App
Throws:
App42Exception

getGameByName

public Game getGameByName(java.lang.String gameName)
                   throws App42Exception
Retrieves the game by the specified name

Parameters:
gameName - - Name of the game that has to be fetched
Returns:
Game object containing the game which has been created
Throws:
App42Exception