@acceleratxr/core_sdk / LeaderboardRecord
Class: LeaderboardRecord#
Describes a user’s single score record within a given leaderboard.
REQUIRES: Leaderboard Services
author Jean-Philippe Steinmetz info@acceleratxr.com
Hierarchy#
-
↳ LeaderboardRecord
Index#
Constructors#
Properties#
Accessors#
Constructors#
constructor#
+ new LeaderboardRecord(other?: any): LeaderboardRecord
Overrides EntityBase.constructor
Defined in src/models/LeaderboardRecord.ts:41
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: LeaderboardRecord
Properties#
dateCreated#
• dateCreated: Date = new Date()
Inherited from EntityBase.dateCreated
Defined in src/EntityBase.ts:18
The date and time that the object was created.
dateModified#
• dateModified: Date = new Date()
Inherited from EntityBase.dateModified
Defined in src/EntityBase.ts:23
The date and time that the object was last modified.
leaderboardUid#
• leaderboardUid: string = “”
Defined in src/models/LeaderboardRecord.ts:19
The unique identifier of the leaderboard that the record belongs to.
personaUid#
• personaUid: string = “”
Defined in src/models/LeaderboardRecord.ts:24
The unique identifier of the persona that submitted the record.
rank#
• rank: number = 0
Defined in src/models/LeaderboardRecord.ts:29
The global rank of the record in relation to other records within the leaderboard (lower is better).
rankBy#
• rankBy: string = “score”
Defined in src/models/LeaderboardRecord.ts:35
The name of the stat to sort this record’s rank by. This should match the sortBy value of the corresponding
Leaderboard definition.
stats#
• stats: any
Defined in src/models/LeaderboardRecord.ts:41
The persona’s submitted stats for the leaderboard. This object can contain any number of key-value pairs
but there must be at least one that has the same name as the sortBy listed in the Leaderboard definition.
uid#
• uid: string = uuid.v4()
Inherited from EntityBase.uid
Defined in src/EntityBase.ts:13
The universally unique identifier of the object.
version#
• version: number = 0
Inherited from EntityBase.version
Defined in src/EntityBase.ts:28
The optimistic locking version of the object.
Accessors#
ClassName#
• Staticget ClassName(): string
Defined in src/models/LeaderboardRecord.ts:14
Returns: string