PlayerIO

The fastest way to build online games without breaking a sweat.

Objective-C Client Reference

Multiplayer  class documentationClass PIOOneScore

Language: Objective-C

The YGN OneScore service

Properties

 
percentile
The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.
score
OneScore value
topRank
The absolute ranking of this player, if they are one of the top 1000 players. 0 otherwise.

Methods

 
- (void)
addWithScoreValue:
Sets OneScore for the user.
- (void)
addWithScoreValue:successBlock:
Sets OneScore for the user.
- (void)
addWithScoreValue:successBlock:errorBlock:
Sets OneScore for the user.
- (NSArray*)
loadWithUserIds:
Loads OneScore for multiple users.
- (void)
loadWithUserIds:successBlock:
Loads OneScore for multiple users.
- (void)
loadWithUserIds:successBlock:errorBlock:
Loads OneScore for multiple users.
- (void)
refresh
Refresh OneScore for the user.
- (void)
refreshWithSuccessBlock:
Refresh OneScore for the user.
- (void)
refreshWithSuccessBlock:errorBlock:
Refresh OneScore for the user.
- (void)
setWithScoreValue:
Sets OneScore for the user.
- (void)
setWithScoreValue:successBlock:
Sets OneScore for the user.
- (void)
setWithScoreValue:successBlock:errorBlock:
Sets OneScore for the user.

@property (nonatomic) float_t percentile

The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.

@property (nonatomic) int32_t score

OneScore value

@property (nonatomic) int32_t topRank

The absolute ranking of this player, if they are one of the top 1000 players. 0 otherwise.

addWithScoreValue:

Sets OneScore for the user.

Arguments

int32_t scoreValue
The score to add for the user.

addWithScoreValue:successBlock:

Sets OneScore for the user.

Arguments

int32_t scoreValue
The score to add for the user.
void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.

addWithScoreValue:successBlock:errorBlock:

Sets OneScore for the user.

Arguments

int32_t scoreValue
The score to add for the user.
void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.
void(^)(PIOError*error) errorBlock
Callback that will be called instead of successCallback if an error occurs during the operation.

loadWithUserIds:

Loads OneScore for multiple users.

Arguments

NSArray* userIds
Array of user ids (NSString) to load OneScore for

Return Value

NSArray*

loadWithUserIds:successBlock:

Loads OneScore for multiple users.

Arguments

NSArray* userIds
Array of user ids (NSString) to load OneScore for
void(^)(NSArray*oneScoreValues) successBlock
Callback that will be called when the operation succeeds.

loadWithUserIds:successBlock:errorBlock:

Loads OneScore for multiple users.

Arguments

NSArray* userIds
Array of user ids (NSString) to load OneScore for
void(^)(NSArray*oneScoreValues) successBlock
Callback that will be called when the operation succeeds.
void(^)(PIOError*error) errorBlock
Callback that will be called instead of successCallback if an error occurs during the operation.

refresh

Refresh OneScore for the user.

refreshWithSuccessBlock:

Refresh OneScore for the user.

Arguments

void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.

refreshWithSuccessBlock:errorBlock:

Refresh OneScore for the user.

Arguments

void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.
void(^)(PIOError*error) errorBlock
Callback that will be called instead of successCallback if an error occurs during the operation.

setWithScoreValue:

Sets OneScore for the user.

Arguments

int32_t scoreValue
The score to set for the user.

setWithScoreValue:successBlock:

Sets OneScore for the user.

Arguments

int scoreValue
The score to set for the user.
void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.

setWithScoreValue:successBlock:errorBlock:

Sets OneScore for the user.

Arguments

int scoreValue
The score to set for the user.
void(^)(PIOOneScoreValue*oneScoreValue) successBlock
Callback that will be called when the operation succeeds.
void(^)(PIOError*error) errorBlock
Callback that will be called instead of successCallback if an error occurs during the operation.