LeanCloud C# SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
LeanCloud.Storage.LCLeaderboard Class Reference

LCLeaderboard represents LeanCloud leaderboard and contains static functions that handle the statistic. More...

Public Member Functions

Task< ReadOnlyCollection< LCStatistic > > GetStatistics (IEnumerable< LCUser > users)
 Gets the statistics of the users.
 
Task< ReadOnlyCollection< LCStatistic > > GetStatistics (IEnumerable< LCObject > objects)
 Gets the statistics of the objects.
 
Task< ReadOnlyCollection< LCStatistic > > GetStatistics (IEnumerable< string > entities)
 Gets the statistics of the entities.
 
async Task< ReadOnlyCollection< LCLeaderboardArchive > > GetArchives (int skip=0, int limit=10)
 Gets historical data of this leaderboard.
 
Task< ReadOnlyCollection< LCRanking > > GetResults (int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 Gets the rankings.
 
async Task< ReadOnlyCollection< LCRanking > > GetResultsAroundUser (int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 Get the rankings that around the currently logged in user.
 
Task< ReadOnlyCollection< LCRanking > > GetResults (LCUser aroundUser, int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 Get the rankings that around the user.
 
Task< ReadOnlyCollection< LCRanking > > GetResults (LCObject aroundObject, int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 Get the rankings that around the object.
 
Task< ReadOnlyCollection< LCRanking > > GetResults (string aroundEntity, int version=-1, int skip=0, int limit=10)
 Get the rankings that around the entity.
 
Task< ReadOnlyCollection< LCRanking > > GetGroupResults (IEnumerable< string > ids, int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 
Task< ReadOnlyCollection< LCRanking > > GetGroupResultsAroundUser (LCUser user, IEnumerable< string > ids, int version=-1, int skip=0, int limit=10, IEnumerable< string > selectKeys=null, IEnumerable< string > includeKeys=null, IEnumerable< string > includeStatistics=null)
 
async Task< LCLeaderboardUpdateUpdateStrategy (LCLeaderboardUpdateStrategy updateStrategy)
 Updates the update strategy of this LCLeaderboard.
 
async Task< LCLeaderboardUpdateVersionChangeInterval (LCLeaderboardVersionChangeInterval versionChangeInterval)
 Updates the interval of the version that this LCLeaderboard changes.
 
async Task< LCLeaderboardFetch ()
 Fetches leaderboard data.
 
async Task< LCLeaderboardReset ()
 Resets this leaderboard.
 
async Task Destroy ()
 Destroys this leaderboard.
 

Static Public Member Functions

static async Task< LCLeaderboardCreateLeaderboard (string statisticName, LCLeaderboardOrder order=LCLeaderboardOrder.Descending, LCLeaderboardUpdateStrategy updateStrategy=LCLeaderboardUpdateStrategy.Better, LCLeaderboardVersionChangeInterval versionChangeInterval=LCLeaderboardVersionChangeInterval.Week, string memberType=USER_MEMBER_TYPE)
 Creates a LCLeaderboard with a statistic name.
 
static LCLeaderboard CreateWithoutData (string statisticName, string memberType=USER_MEMBER_TYPE)
 Creates an empty leaderboard with a specified name.
 
static Task< LCLeaderboardGetLeaderboard (string statisticName)
 Gets the LCLeaderboard with the given name.
 
static Task< ReadOnlyCollection< LCStatistic > > UpdateStatistics (LCUser user, Dictionary< string, double > statistics, bool overwrite=false)
 Updates the statistic of the user.
 
static Task< ReadOnlyCollection< LCStatistic > > UpdateStatistics (LCObject obj, Dictionary< string, double > statistics, bool overwrite=false)
 Updates the statistic of the object.
 
static Task< ReadOnlyCollection< LCStatistic > > UpdateStatistics (string entity, Dictionary< string, double > statistics, bool overwrite=false)
 Updates the statistic of the entity.
 
static Task< ReadOnlyCollection< LCStatistic > > GetStatistics (LCUser user, IEnumerable< string > statisticNames=null)
 Gets the statistics of the user.
 
static Task< ReadOnlyCollection< LCStatistic > > GetStatistics (LCObject obj, IEnumerable< string > statisticNames=null)
 Gets the statistics of the object.
 
static Task< ReadOnlyCollection< LCStatistic > > GetStatistics (string entity, IEnumerable< string > statisticNames=null)
 Gets the statistics of the entity.
 
static Task DeleteStatistics (LCUser user, IEnumerable< string > statisticNames)
 Deletes the statistics of the user with the given names.
 
static Task DeleteStatistics (LCObject obj, IEnumerable< string > statisticNames)
 Deletes the statistics of the object with the given names.
 
static Task DeleteStatistics (string entity, IEnumerable< string > statisticNames)
 Deletes the statistics of the entity with the given names.
 

Static Public Attributes

const string USER_MEMBER_TYPE = "_User"
 
const string ENTITY_MEMBER_TYPE = "_Entity"
 

Properties

string StatisticName [get]
 The name of statistic.
 
LCLeaderboardOrder Order [get]
 The order of this leaderboard.
 
LCLeaderboardUpdateStrategy UpdateStrategy [get]
 The update strategy of this leaderboard.
 
LCLeaderboardVersionChangeInterval VersionChangeInterval [get]
 The interval of the version that the leaderboard resets.
 
string MemberType [get]
 The member type of this leaderboard.
 
int Version [get]
 The version of this leaderboard.
 
DateTime NextResetAt [get]
 The next time that the leaderboard resets.
 
DateTime CreatedAt [get]
 The time that the leaderboard created.
 

Detailed Description

LCLeaderboard represents LeanCloud leaderboard and contains static functions that handle the statistic.

Member Function Documentation

◆ CreateLeaderboard()

static async Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.CreateLeaderboard ( string  statisticName,
LCLeaderboardOrder  order = LCLeaderboardOrder::Descending,
LCLeaderboardUpdateStrategy  updateStrategy = LCLeaderboardUpdateStrategy::Better,
LCLeaderboardVersionChangeInterval  versionChangeInterval = LCLeaderboardVersionChangeInterval::Week,
string  memberType = USER_MEMBER_TYPE 
)
inlinestatic

Creates a LCLeaderboard with a statistic name.

Parameters
statisticName
order
updateStrategy
versionChangeInterval
Returns

◆ CreateWithoutData()

static LCLeaderboard LeanCloud.Storage.LCLeaderboard.CreateWithoutData ( string  statisticName,
string  memberType = USER_MEMBER_TYPE 
)
inlinestatic

Creates an empty leaderboard with a specified name.

Parameters
statisticName
Returns

◆ DeleteStatistics() [1/3]

static Task LeanCloud.Storage.LCLeaderboard.DeleteStatistics ( LCObject  obj,
IEnumerable< string >  statisticNames 
)
inlinestatic

Deletes the statistics of the object with the given names.

Parameters
obj
statisticNames
Returns

◆ DeleteStatistics() [2/3]

static Task LeanCloud.Storage.LCLeaderboard.DeleteStatistics ( LCUser  user,
IEnumerable< string >  statisticNames 
)
inlinestatic

Deletes the statistics of the user with the given names.

Parameters
user
statisticNames
Returns

◆ DeleteStatistics() [3/3]

static Task LeanCloud.Storage.LCLeaderboard.DeleteStatistics ( string  entity,
IEnumerable< string >  statisticNames 
)
inlinestatic

Deletes the statistics of the entity with the given names.

Parameters
entity
statisticNames
Returns

◆ Destroy()

async Task LeanCloud.Storage.LCLeaderboard.Destroy ( )
inline

Destroys this leaderboard.

Returns

◆ Fetch()

async Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.Fetch ( )
inline

Fetches leaderboard data.

Returns

◆ GetArchives()

async Task< ReadOnlyCollection< LCLeaderboardArchive > > LeanCloud.Storage.LCLeaderboard.GetArchives ( int  skip = 0,
int  limit = 10 
)
inline

Gets historical data of this leaderboard.

Parameters
skip
limit
Returns

◆ GetGroupResults()

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetGroupResults ( IEnumerable< string >  ids,
int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

◆ GetGroupResultsAroundUser()

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetGroupResultsAroundUser ( LCUser  user,
IEnumerable< string >  ids,
int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

◆ GetLeaderboard()

static Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.GetLeaderboard ( string  statisticName)
inlinestatic

Gets the LCLeaderboard with the given name.

Parameters
statisticName
Returns

◆ GetResults() [1/4]

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetResults ( int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

Gets the rankings.

Parameters
version
skip
limit
selectKeys
includeStatistics
Returns

◆ GetResults() [2/4]

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetResults ( LCObject  aroundObject,
int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

Get the rankings that around the object.

Parameters
obj
version
skip
limit
selectKeys
includeStatistics
Returns

◆ GetResults() [3/4]

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetResults ( LCUser  aroundUser,
int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

Get the rankings that around the user.

Parameters
user
version
skip
limit
selectKeys
includeStatistics
Returns

◆ GetResults() [4/4]

Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetResults ( string  aroundEntity,
int  version = -1,
int  skip = 0,
int  limit = 10 
)
inline

Get the rankings that around the entity.

Parameters
entity
version
skip
limit
selectKeys
includeStatistics
Returns

◆ GetResultsAroundUser()

async Task< ReadOnlyCollection< LCRanking > > LeanCloud.Storage.LCLeaderboard.GetResultsAroundUser ( int  version = -1,
int  skip = 0,
int  limit = 10,
IEnumerable< string >  selectKeys = null,
IEnumerable< string >  includeKeys = null,
IEnumerable< string >  includeStatistics = null 
)
inline

Get the rankings that around the currently logged in user.

Parameters
version
skip
limit
selectKeys
includeStatistics
Returns

◆ GetStatistics() [1/6]

Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( IEnumerable< LCObject objects)
inline

Gets the statistics of the objects.

Parameters
objects
Returns

◆ GetStatistics() [2/6]

Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( IEnumerable< LCUser users)
inline

Gets the statistics of the users.

Parameters
users
Returns

◆ GetStatistics() [3/6]

Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( IEnumerable< string >  entities)
inline

Gets the statistics of the entities.

Parameters
entities
Returns

◆ GetStatistics() [4/6]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( LCObject  obj,
IEnumerable< string >  statisticNames = null 
)
inlinestatic

Gets the statistics of the object.

Parameters
obj
statisticNames
Returns

◆ GetStatistics() [5/6]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( LCUser  user,
IEnumerable< string >  statisticNames = null 
)
inlinestatic

Gets the statistics of the user.

Parameters
user
statisticNames
Returns

◆ GetStatistics() [6/6]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.GetStatistics ( string  entity,
IEnumerable< string >  statisticNames = null 
)
inlinestatic

Gets the statistics of the entity.

Parameters
entity
statisticNames
Returns

◆ Reset()

async Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.Reset ( )
inline

Resets this leaderboard.

Returns

◆ UpdateStatistics() [1/3]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.UpdateStatistics ( LCObject  obj,
Dictionary< string, double >  statistics,
bool  overwrite = false 
)
inlinestatic

Updates the statistic of the object.

Parameters
obj
statistics
overwrite
Returns

◆ UpdateStatistics() [2/3]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.UpdateStatistics ( LCUser  user,
Dictionary< string, double >  statistics,
bool  overwrite = false 
)
inlinestatic

Updates the statistic of the user.

Parameters
user
statistics
overwrite
Returns

◆ UpdateStatistics() [3/3]

static Task< ReadOnlyCollection< LCStatistic > > LeanCloud.Storage.LCLeaderboard.UpdateStatistics ( string  entity,
Dictionary< string, double >  statistics,
bool  overwrite = false 
)
inlinestatic

Updates the statistic of the entity.

Parameters
entity
statistics
overwrite
Returns

◆ UpdateUpdateStrategy()

async Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.UpdateUpdateStrategy ( LCLeaderboardUpdateStrategy  updateStrategy)
inline

Updates the update strategy of this LCLeaderboard.

Parameters
updateStrategy
Returns

◆ UpdateVersionChangeInterval()

async Task< LCLeaderboard > LeanCloud.Storage.LCLeaderboard.UpdateVersionChangeInterval ( LCLeaderboardVersionChangeInterval  versionChangeInterval)
inline

Updates the interval of the version that this LCLeaderboard changes.

Parameters
versionChangeInterval
Returns

Member Data Documentation

◆ ENTITY_MEMBER_TYPE

const string LeanCloud.Storage.LCLeaderboard.ENTITY_MEMBER_TYPE = "_Entity"
static

◆ USER_MEMBER_TYPE

const string LeanCloud.Storage.LCLeaderboard.USER_MEMBER_TYPE = "_User"
static

Property Documentation

◆ CreatedAt

DateTime LeanCloud.Storage.LCLeaderboard.CreatedAt
get

The time that the leaderboard created.

◆ MemberType

string LeanCloud.Storage.LCLeaderboard.MemberType
get

The member type of this leaderboard.

◆ NextResetAt

DateTime LeanCloud.Storage.LCLeaderboard.NextResetAt
get

The next time that the leaderboard resets.

◆ Order

LCLeaderboardOrder LeanCloud.Storage.LCLeaderboard.Order
get

The order of this leaderboard.

◆ StatisticName

string LeanCloud.Storage.LCLeaderboard.StatisticName
get

The name of statistic.

◆ UpdateStrategy

LCLeaderboardUpdateStrategy LeanCloud.Storage.LCLeaderboard.UpdateStrategy
get

The update strategy of this leaderboard.

◆ Version

int LeanCloud.Storage.LCLeaderboard.Version
get

The version of this leaderboard.

◆ VersionChangeInterval

LCLeaderboardVersionChangeInterval LeanCloud.Storage.LCLeaderboard.VersionChangeInterval
get

The interval of the version that the leaderboard resets.


The documentation for this class was generated from the following file: