Leaderboards | CraytaKit
Skip to main content

Leaderboards

Class Functions

Class Function NameReturn TypeDescriptionTags
Leaderboards.GetNearbyValues(string leaderboardId, number numValues, User user, function callback)NoneGets nearby leaderboard values on the specified leaderboard for the specified user, centered on the user where possible. Results are returned as a parameter to the callback function. Callback function parameter is a table of results, each result contains name, score, rank & icon. May return cached results if used frequentlyNone
Leaderboards.GetTopValues(string leaderboardId, number numValues, function callback)NoneGets the top ranking values from the specified leaderboard. Results are returned as a parameter to the callback function. Callback function parameter is a table of results, each result contains name, score, rank & icon. May return cached results if used frequentlyNone
Leaderboards.GetMetadata(function callback)NoneSee Leaderboards.GetAllMetadata Gets the metadata of every leaderboard associated with this game. Results are as a parameter to the callback function. Callback function parameter is a table of results, each result contains id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeDeprecated
Leaderboards.GetMetadata(string leaderboardId, function callback)NoneGets the metadata of a single named leaderboard for this game. Results are as a parameter to the callback function. Callback function parameter is a table containing id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeNone
Leaderboards.GetAllMetadata(function callback)NoneGets the metadata of every leaderboard associated with this game. Results are as a parameter to the callback function. Callback function parameter is a table of results, each result contains id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeNone
Leaderboards.GetNearbyValuesForGame(string gameId, string leaderboardId, number numValues, User user, function callback)NoneGets the top ranking values for the specified GameId Results are returned as a parameter to the callback function. Callback function parameter is a table of results, each result contains name, score, rank & icon. May return cached results if used frequentlyNone
Leaderboards.GetMetadataForGame(string gameId, function callback)NoneSee Leaderboards.GetAllMetadataForGame Gets the metadata of every leaderboard associated with the specified GameId. Results are as a parameter to the callback function. Callback function parameter is a table of results, each result contains id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeDeprecated
Leaderboards.GetMetadataForGame(string gameId, string leaderboardId, function callback)NoneGets the metadata of a single named leaderboard associated with the specified GameId. Results are as a parameter to the callback function. Callback function parameter is a table containing id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeNone
GetAllMetadataForGame(string gameId, function callback)NoneGets the metadata of every leaderboard associated with the specified GameId. Results are as a parameter to the callback function. Callback function parameter is a table of results, each result contains id, displayName, displayIndex, resetTime, isPeriodic, isAscending & scoreTypeNone

Examples

© 2021 CraytaKit