-
Notifications
You must be signed in to change notification settings - Fork 13
User
Brandon Cooke edited this page Aug 6, 2019
·
2 revisions
A User is a data object that holds information about users on Smash.gg's platform
This is equivalent to the Player
object in smash.gg's context.
var user = new User(000000, 'cookiE', 'Brandon Cooke', 'US', 'GA', 'Recursion')
console.log(user.getTag()); // prints 'cookiE'
console.log(user.getState()); // prints 'GA'
User(
id: number,
gamerTag: string,
prefix: string | null,
color: string | null,
twitchStream: string | null,
twitterHandle: string | null,
youtube: string | null,
region: string | null,
state: string | null,
country: string | null,
gamerTagChangedAt: number | null
)
-
id
- number
-
gamerTag
- string
-
prefix
- string | null
-
color
- string | null
-
twitchStream
- string | null
-
twitterHandle
- string | null
-
youtube
- string | null
-
region
- string | null
-
state
- string | null
-
country
- string | null
-
gamerTagChangedAt
- number | null
-
getId()
- gets the numeric id of the User
- returns number
-
getGamerTag()
- gets the gamer tag of the User
- returns string
-
getSponsor()
- get the sponsor prefix of the User
- returns string | null
-
getColor()
- get the color the User has chosen
- returns string | null
-
getTwitchStream()
- get the linked twitch channel name of the User
- returns string | null
-
getTwitterHandle()
- get the linked twitter handle of the User
- returns string | null
-
getYoutube()
- get the linked youtube channel of the User
- returns string | null
-
getRegion()
- get the region the User is from
- returns string | null
-
getState()
- get the state the User is from
- returns string | null
-
getCountry()
- get the country the User is from
- returns string | null
-
getGamerTagChangedAt()
- get the last time the User changed their gamer tag as a JS Date object
- returns Date | null
-
getRecentSets()
- get a list of the recent GGSets the User has competed in
- return Promise<GGSet[]>
-
getRankings()
- get a list of the rankings the User has achieved.
- return Promise<PlayerRank[]>