User Methods

Methods for accessing information about Armor Games users.


Returns information for the current user.

ag.authenticateUser().then(function(user) {
  // user (ArmorGamesUser object)

getUser(uid|username, isUsername)

Returns information for the specified user, either by UID or username.

ag.getUser(uid).then(function(user) {
  // user (ArmorGamesUser object)
ag.getUser(username, true).then(function(user) {
  // user (ArmorGamesUser object)

getFriends({ uid, limit, offset, page })

Returns an array of users who are connected to the specified user.

  uid: ...,
  limit: ...,
  offset: ...,
}).then(function(users) {
  // users (array of ArmorGamesUser objects)