iOS
Android
Unity
REST Api
BDArenaLeaderboards

Availability : ver 1.0 and later

Declared in : BDArenaLeaderboards.h

Sample code : -

Overview

The BDArenaLeaderboards class is the main interface for accessing the Arena Daemon's leaderboards features.

 

BDArenaLeaderboards declares methods for retrieving leaderboards and for posting player's score.

 

The BDArenaLeaderboards object is accessible through leaderboardsConnector property of the unique BDArenaConnector instance. 

 

 

    BDArenaConnector* arenaConnector = [BDArenaConnector getInstance];    

    BDArenaLeaderboards* leaderboardsConnector = arenaConnector.leaderboardsConnector; 

 

Methods

Operations 

- getLeaderboards

- setScore:toLeaderboardWithId:

- setHighscore:toLeaderboardWithId:

- postScore:toLeaderboardWithId:

- getScoreForLeaderboardWithId:start:limit:

- getScoreForPlayerWithAuid:inLeaderboardWithId:

 

 


 

 

 

getLeaderboards

 

Retrieves the list of available leaderboards.

 

- (void) getLeaderboards;

 

Discussion

The results of this operation can be handled implementing 

arenaLeaderboards:getLeaderboardsSuccessfullyCompletedWithArray: and arenaLeaderboards:getLeaderboardsDidFailWithError: 

protocol methods of BDArenaLeaderboardsDelegate.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaLeaderboards.h

 

 

 

setScore:toLeaderboardWithId:

 

Sets the local player's score in a specific leaderboard overwriting the previous stored value.

 

- (void) setScore:(NSInteger)score toLeaderboardWithId:(NSInteger)leaderboardId;

 

Parameters 

score

    The player's score.

leaderboardId

    Leaderboard's unique identifier.

 

Discussion

In order to obtain all the available leaderboard identifiers, the developer must call getLeaderboards.

The results of this operation can be handled implementing 

arenaLeaderboards:setScoreSuccessfullyCompletedToLeaderboardWithId:withScore:withPlacement: and 

arenaLeaderboards:setScoreToLeaderboardWithId:didFailWithError: protocol methods of BDArenaLeaderboardsDelegate.

Note that if the developer runs the application in SANDBOX environment,

the score posted is not actually saved and the score of the local player

does not change even if this call is successfully performed.

 

Availability

available in SDK ver 2.2 and later

 

Declared in

BDArenaLeaderboards.h

 

 

 

setHighscore:toLeaderboardWithId:

 

Sets the local player's high score in a specific leaderboard overwriting the previous stored value

if the new passed value is greater.

 

- (void) setHighscore:(NSInteger)highscore toLeaderboardWithId:(NSInteger)leaderboardId;

 

Parameters 

highscore

    The player's high score.

leaderboardId

    Leaderboard's unique identifier.

 

Discussion

In order to obtain all the available leaderboard identifiers, the developer must call getLeaderboards.

The results of this operation can be handled implementing 

arenaLeaderboards:setHighscoreSuccessfullyCompletedToLeaderboardWithId:
withOldHighscore:withScore:withPlacement:didOverwritePreviousScore:
 and 

arenaLeaderboards:setHighscoreToLeaderboardWithId:didFailWithError: protocol methods

of BDArenaLeaderboardsDelegate.

Note that if the developer runs the application in SANDBOX environment,

the high score posted is not actually saved and the high score of the local player

does not change even if this call is successfully performed.

 

Availability

available in SDK ver 2.5.3 and later

 

Declared in

BDArenaLeaderboards.h

 

 

 

postScore:toLeaderboardWithId:

 

Sets the local player's score in a specific leaderboard adding the new score

to the previous stored value.

 

- (void) postScore:(NSInteger)score toLeaderboardWithId:(NSInteger)leaderboardId;

 

Parameters 

score

    The player's score.

leaderboardId

    Leaderboard's unique identifier.

 

Discussion

In order to obtain all the available leaderboard identifiers, the developer must call getLeaderboards.

The results of this operation can be handled implementing 

arenaLeaderboards:postScoreSuccessfullyCompletedToLeaderboardWithId:withPostedScore:
withNewScore:withPlacement:
 
and arenaLeaderboards:postScoreToLeaderboardWithId:didFailWithError: 

protocol methods of BDArenaLeaderboardsDelegate.

Note that if the developer runs the application in SANDBOX environment,

the score posted is not actually saved and the score of the local player

does not change even if this call is successfully performed.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaLeaderboards.h

 

 

 

getScoreForLeaderboardWithId:start:limit

 

Retrieves the score's list of a specific leaderboard.

 

- (void) getScoreForLeaderboardWithId:(NSInteger)leaderboardId start:(NSInteger)start limit:(NSInteger)limit;

 

Parameters 

leaderboardId

    The leaderboard identifier.

start

    The start index of the requested range of the scores list.

limit

    The number of items to be returned.

 

Discussion

The results of this operation can be handled implementing 

arenaLeaderboards:getScoreForLeaderboardWithId:successfullyCompletedWithArray: and 

arenaLeaderboards:getScoreForLeaderboardWithId:didFailWithError: 

protocol methods of BDArenaLeaderboardsDelegate.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaLeaderboards.h

 

 

 

getScoreForPlayerWithAuid:inLeaderboardWithId:

 

Retrieves the score's list of a specific leaderboard.

 

- (void) getScoreForPlayerWithAuid:(NSInteger)auid inLeaderboardWithId:(NSInteger)leaderboardId;

 

Parameters 

auid

    The Arena Daemon Unique Id (auid) of the requested player.

leaderboardId

    The leaderboard identifier.

 

Discussion

The results of this operation can be handled implementing 

arenaLeaderboards:getScoreForPlayerWithAuid:successfullyCompletedWithScore:
withPlacement:withPlayerData:
 and 

arenaLeaderboards:getScoreForPlayerWithAuid:didFailWithError: 

protocol methods of BDArenaLeaderboardsDelegate.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaLeaderboards.h