PlayerIO

The fastest way to build online games without breaking a sweat.

Javascript Client Reference

Javascript code reference documentation for class: PlayerIOClass: PlayerIO

Main class for authenticating a user and getting a client.

Javascript code reference documentation for class: achievementClass: achievement

This class encapsulates all the data of a single achievement.

Javascript code reference documentation for class: achievementsClass: achievements

The Achievements service. This class is used to update the progress of an achievement for the current user, and loading achievements of other users. All achievements have to be defined in the admin panel first.

Javascript code reference documentation for class: bigDBClass: bigDB

The BigDB service. This class is used to create, load, and delete database objects. All database objects are stored in tables and have a unique key. You can set up tables in your admin panel, and you can also set up indexes there for when you want to load objects by properties or ranges of properties.

Javascript code reference documentation for class: clientClass: client

An instance of this class is returned after successfully authenticating a user to PlayerIO. It contains the id of the current user, and methods for making all API calls on behalf of that user.

Javascript code reference documentation for class: connectionClass: connection

An instance of this class is returned after successfully joining a Multiplayer room. It encapsulates the active network connection between the user and the room, and has methods for sending and handling messages, as well as disconnecting fom the room. See the Multiplayer class for examples.

Javascript code reference documentation for class: databaseobjectClass: databaseobject

This class represents a database object in BigDB. It contains all the data of the database object, as well as a method for persisting any changes back to BigDB.

Javascript code reference documentation for class: errorLogClass: errorLog

The ErrorLog service. This class has methods for writing custom errors to your game's error log. You can browse your game's error log in the PlayerIO admin panel.

Javascript code reference documentation for class: gameFSClass: gameFS

The GameFS service. This class is used to get an absolute URL for assets you have stored in GameFS.

Javascript code reference documentation for class: gameRequestClass: gameRequest

This class encapsulates all the data of a received game request.

Javascript code reference documentation for class: gameRequestsClass: gameRequests

The GameRequest service. This class has methods for sending game requests to other users, and for handling the requests received by the current user. All game request types have to be defined in the admin panel first.

Javascript code reference documentation for class: leaderboardEntryClass: leaderboardEntry

This class encapsulates a leaderboard entry for a user, it contains the connectUserId, the absolute rank of the user, and the score of the user on the leaderboard this entry was loaded from.

Javascript code reference documentation for class: leaderboardsClass: leaderboards

The Leaderboard service. This class has methods for setting a player's score on a leaderboard, getting the number of players on a leaderboard, and getting toplists of players or the neighbourhood of players around the current player. Leaderboard groups have to be defined in the admin panel first.

Javascript code reference documentation for class: messageClass: message

Represents a message sent between client and server. A message consists of a string type, and a payload of zero or more typed parameters.

Javascript code reference documentation for class: multiplayerClass: multiplayer

The Multiplayer service. This class has method for listing, creating, and joining multiplayer rooms. Once a user has been sucessfully connected to a room, a connection object will be returned. This class is also used to override the development server setting when developing and testing multiplayer code against your local development server.

Javascript code reference documentation for class: notificationEndpointClass: notificationEndpoint

This class encapsulates all the data of a notification endpoint.

Javascript code reference documentation for class: notificationsClass: notifications

The Notifications service. This class is used for registering mobile endpoints and sending mobile push notifications to other users.

Javascript code reference documentation for class: payVaultClass: payVault

The PayVault service. Instances of this class represent a specific user's Vault, and contains methods and properties both for inspecting and manipulating the contents. All properties and methods that inspect the Vault requires that it is up-to-date first. This can be achieved explicitly by calling the refresh() method or implicitly by calling any method which modifies the Vault such as credit() or debit().

Javascript code reference documentation for class: payVaultHistoryEntryClass: payVaultHistoryEntry

This class represents an entry in a user's PayVault history.

Javascript code reference documentation for class: playerInsightClass: playerInsight

The PlayerInsight service. This class is used for setting segments for the current user and tracking events in PlayerInsight.

Javascript code reference documentation for class: PlayerIOErrorClass: PlayerIOError

Instances of this class are returned in all error callbacks and contain information about the error that occurred.

Javascript code reference documentation for class: PlayerIOErrorCodeClass: PlayerIOErrorCode

This class contains a list of all the error codes that can be returned from PlayerIO calls

Javascript code reference documentation for class: publishingNetworkClass: publishingNetwork

The PlayerIO Publishing Network service. This class is used to access all the functionality available to games that are published on the PlayerIO Publishing Network.

Javascript code reference documentation for class: publishingNetworkPaymentsClass: publishingNetworkPayments

The PlayerIO Publishing Network Payments service. This class is used to initiate in-game payments for games that are published on the PlayerIO Publishing Network.

Javascript code reference documentation for class: publishingNetworkProfileClass: publishingNetworkProfile

This class encapsulates all the data of a PlayerIO Publishing Network Profile.

Javascript code reference documentation for class: publishingNetworkProfilesClass: publishingNetworkProfiles

PlayerIO Publishing Network Profiles service. This class is used to fetch or show the profile of the current user, or to load the profiles of other users.

Javascript code reference documentation for class: publishingNetworkRelationsClass: publishingNetworkRelations

The PlayerIO Publishing Network Relations service. This class is used to fetch the current users friends, and to show the various friend management dialogs for games published on the PlayerIO Publishing Network.

Javascript code reference documentation for class: quickConnectClass: quickConnect

The QuickConnect service. This class is used for support methods for users created and authenticated through the Simple Users feature.

Javascript code reference documentation for class: simpleGetCaptchaOutputClass: simpleGetCaptchaOutput

Captcha information for the QuickConnect simple users feature.

Javascript code reference documentation for class: vaultItemClass: vaultItem

This class represents an item in a user's Vault