@acceleratxr/core_sdk / Leaderboard
Class: Leaderboard#
Describes a single leaderboard.
REQUIRES: Leaderboard Services
author Jean-Philippe Steinmetz info@acceleratxr.com
Hierarchy#
-
↳ Leaderboard
Index#
Constructors#
Properties#
Accessors#
Constructors#
constructor#
+ new Leaderboard(other?: any): Leaderboard
Overrides EntityBase.constructor
Defined in src/models/Leaderboard.ts:86
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Leaderboard
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.
description#
• description: string = “”
Defined in src/models/Leaderboard.ts:44
A textual description of the leaderboard.
icon#
• icon: string = “”
Defined in src/models/Leaderboard.ts:49
The icon to display when representing the leaderboard.
name#
• name: string = “”
Defined in src/models/Leaderboard.ts:39
The unique name of the leaderboard.
productUid#
• productUid: string | undefined = undefined
Defined in src/models/Leaderboard.ts:56
The uid of the product that this leaderboard is associated with.
REQUIRES: Leaderboard Services.
rankingSchedule#
• rankingSchedule: string | undefined = undefined
Defined in src/models/Leaderboard.ts:63
The cron-tab like schedule that will rank the leaderboard records. Setting to undefined will rank
all records in real-time. Make sure to use a staggered schedule when also setting a value for resetSchedule
to prevent from trying to rank the leaderboard at the same time the reset operation is occuring.
resetSchedule#
• resetSchedule: string | undefined = undefined
Defined in src/models/Leaderboard.ts:70
The cron-tab like schedule that will reset all leaderboard records. Setting to undefined will retain
all records indefinitely. Make sure to use a staggered schedule when also setting a value for rankingSchedule
to prevent from trying to reset the leaderboard at the same time the ranking operation is occuring.
sort#
• sort: SortDirection = SortDirection.DESCENDING
Defined in src/models/Leaderboard.ts:76
The direction to sort the leaderboard record set. SortDirection.ASCENDING will sort from records from lowest
to highest score, SortDirection.DESCENDING sorts from highest to lowest score.
sortBy#
• sortBy: string = “score”
Defined in src/models/Leaderboard.ts:81
The name of the leaderboard stat that records will be sorted by. Default is score.
uid#
• uid: string = uuid.v4()
Inherited from EntityBase.uid
Defined in src/EntityBase.ts:13
The universally unique identifier of the object.
updateMethod#
• updateMethod: UpdateMethod = UpdateMethod.BEST_SCORE
Defined in src/models/Leaderboard.ts:86
The method that will be used to accept new leaderboard records submissions. Default is BEST_SCORE.
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/Leaderboard.ts:34
Returns: string