CLScoreServerRequest Class Reference
Inherits from | NSObject |
Declared in | CLScoreServerRequest.h |
Tasks
-
connection
connection 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)
-
– parseScores
parse 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.
-
– parseRank
It’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)delegate
Declared In
CLScoreServerRequest.h
parseRank
It’s actually not parsing anything, just returning int for a rank. Kept name PARSE for convinience with parseScores
- (int)parseRank
Declared In
CLScoreServerRequest.h
parseScores
parse the received JSON scores and convert it to objective-c objects
- (NSArray *)parseScores
Declared In
CLScoreServerRequest.h
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.
- (BOOL)requestRankForScore:(int)score andCategory:(NSString *)category
Declared In
CLScoreServerRequest.h
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)
- (BOOL)requestScores:(tQueryType)type limit:(int)limit offset:(int)offset flags:(tQueryFlags)flags
Declared In
CLScoreServerRequest.h
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.
- (BOOL)requestScores:(tQueryType)type limit:(int)limit offset:(int)offset flags:(tQueryFlags)flags category:(NSString *)category
Declared In
CLScoreServerRequest.h