GPGTurnBasedModel Class Reference

GPGTurnBasedModel Class Reference

Overview

The model used to handle in-memory, stored, and on-network turn-based matches.

The model will be kept up-to-date with and automatically re-synced when needed/possible. To manually refresh the match data, use [applicationModel reloadDataForKey:GPGModelAllMatchesKey]. To fetch a single raw match from the server, use [GPGTurnBasedMatch fetchMatchWithId:];

Public Member Functions

(NSArray *) - allMatches
(NSArray *) - matchesForMatchStatus:
(NSArray *) - matchesForUserMatchStatus:
(GPGTurnBasedMatch *) - matchForId:

Member Function Documentation

- (NSArray *) allMatches
Returns:
All matches currently known to the model.
- (NSArray *) matchesForMatchStatus: (GPGTurnBasedMatchStatus)  status
Parameters:
statusThe requested match status.
Returns:
All matches matching the given match status.
- (NSArray *) matchesForUserMatchStatus: (GPGTurnBasedUserMatchStatus)  status
Parameters:
statusThe requested user match status.
Returns:
All matches matching the given user match status.
- (GPGTurnBasedMatch *) matchForId: (NSString *)  matchId
Parameters:
matchIdThe requested matchId.
Returns:
The match as currently known to the model.