CLScoreServerRequest Class Reference
| Inherits from | NSObject |
| Declared in | CLScoreServerRequest.h |
Tasks
-
connectionconnection to the server
property -
+ serverWithGameName:delegate:creates a ScoreServerRequest server with a game name
-
– initWithGameName:delegate:initializes a ScoreServerRequest with a game name
-
– requestScores:limit:offset:flags:category:request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country) category: an NSString. For example: ‘easy’, ‘medium’, ‘type1’… When requesting scores, they can be filtered by this field.
-
– requestScores:limit:offset:flags:request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country)
-
– parseScoresparse the received JSON scores and convert it to objective-c objects
-
– requestRankForScore:andCategory:request rank for a given score using a predefined query. This is an asyncronous request. score: int for a score category: an NSString. For example: ‘easy’, ‘medium’, ‘type1’… When requesting ranks, they can be filtered by this field.
-
– parseRankIt’s actually not parsing anything, just returning int for a rank. Kept name PARSE for convinience with parseScores
Instance Methods
initWithGameName:delegate:
initializes a ScoreServerRequest with a game name
- (id)initWithGameName:(NSString *)name delegate:(id)delegateDeclared In
CLScoreServerRequest.hparseRank
It’s actually not parsing anything, just returning int for a rank. Kept name PARSE for convinience with parseScores
- (int)parseRankDeclared In
CLScoreServerRequest.hparseScores
parse the received JSON scores and convert it to objective-c objects
- (NSArray *)parseScoresDeclared In
CLScoreServerRequest.hrequestRankForScore:andCategory:
request rank for a given score using a predefined query. This is an asyncronous request. score: int for a score category: an NSString. For example: ‘easy’, ‘medium’, ‘type1’… When requesting ranks, they can be filtered by this field.
- (BOOL)requestRankForScore:(int)score andCategory:(NSString *)categoryDeclared In
CLScoreServerRequest.hrequestScores:limit:offset:flags:
request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country)
- (BOOL)requestScores:(tQueryType)type limit:(int)limit offset:(int)offset flags:(tQueryFlags)flagsDeclared In
CLScoreServerRequest.hrequestScores:limit:offset:flags:category:
request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country) category: an NSString. For example: ‘easy’, ‘medium’, ‘type1’… When requesting scores, they can be filtered by this field.
- (BOOL)requestScores:(tQueryType)type limit:(int)limit offset:(int)offset flags:(tQueryFlags)flags category:(NSString *)categoryDeclared In
CLScoreServerRequest.h