Game API
Changelog
- Added optional language parameter for adding achievements (26 May 2010)
- Achievements API methods save & return gameplay sessionID (1 April 2010)
gatcha
General purpose Gatcha API methods.
gatcha.auth
Authentication API methods.
-
gatcha.auth.getTicket
Returns a ticket to use for other authenticated API calls.
-
gatcha.auth.getAvailableMethods
Returns a list of API-methods (with details) you have the permission to call.
gatcha.tools
Different handy tools related to gatcha.
-
gatcha.tools.minifyURL
Minifies url in true bit.ly style.
-
gatcha.tools.setMinifyURL
Sets a minified url in true bit.ly style with a given code.
game
API methods for use by game developers.
game.env
General purpose API methods for game developers.
-
game.env.getServerTime
Returns the current server time. (Helps in preventing cheating via changing client side clock.)
-
game.env.postError
Used for debugging purposes.
-
game.env.canLoadGame
Checks if the url for the game-file is valid. Security measure.
game.leaderboard
API methods for working with leaderboards.
-
game.leaderboard.get
alpha
Returns the list of users who score best for your game.
game.game
-
game.game.getRelatedGames
Returns a list of games related to the current game
game.i18n
API methods for internationalisation and localisation of the game.
-
game.i18n.getTranslations
Returns the messagebundle with translations for the game.
-
game.i18n.getWrapperTranslations
Returns the messagebundle with translations for the Gatcha game wrapper.
game.singleplayerSession
API methods for handling a singleplayer gameplay.
-
game.singleplayerSession.start
Mark a gameplay for a singleplayer game as started.
-
game.singleplayerSession.logData
Log certain data during the gameplay of a singleplayer game. Used for debugging purposes.
-
game.singleplayerSession.updateHighScore
Submit the highscore for this gameplay of a singleplayer game.
-
game.singleplayerSession.end
Mark a gameplay session of a singleplayer game as ended.
game.multiplayerSession
API methods for handling a multiplayer gameplay.
-
game.multiplayerSession.start
Mark a gameplay of a multiplayer game as started.
-
game.multiplayerSession.logData
Log certain data during the gameplay of a multiplayer game. Used for debugging purposes.
-
game.multiplayerSession.updateRating
Update the rating of involved users for this gameplay of a multiplayer game.
-
game.multiplayerSession.end
Mark a gameplay session of a multiplayer game as ended.
game.achievements
API methods for handling game achievements.
-
game.achievements.addUserReachedAchievement
alpha
Submit that a user reached a certain achievement. This method will manage the achievement itself (create if unknown "achievement"-identifier, update details if existing) as well as create the link between the user and the achievement. (This to avoid having to configure the achievement details seperately.)
-
game.achievements.didUserReachAchievement
alpha
Checks if a user already reached a certain achievement, and if so when.
-
game.achievements.getAchievementsByUserCount
alpha
Returns how many achievements a user already reached.
-
game.achievements.getAchievementsByUser
alpha
Returns the list of achievements a user already reached.
-
game.achievements.getUsersByAchievementCount
alpha
Returns the amount of users that reached a certain achievement.
-
game.achievements.getUsersByAchievement
alpha
Returns a list of users that reached a certain achievement.
game.persistentStorage
-
game.persistentStorage.put
alpha
Saves data for a certain user / key combination in the persistent storage.
-
game.persistentStorage.get
alpha
Fetches data for a certain user and for a certain key from the persistent storage.
-
game.persistentStorage.delete
alpha
Removes previously stored data from the persistent storage for a certain user and for a certain key.
game.photos
API methods for working with photos & albums
-
game.photos.upload
alpha
Upload photo to container
game.user
API methods for retrieving user information in your game
-
game.user.getFriends
alpha
Get friends of the user
-
game.user.getUserDetails
alpha
Get the details of the user specified
