GPGQuest Class Reference


Overview

A single data structure allowing you to access data about the status of a specific quest.

Public Member Functions

(void) - acceptWithCompletionHandler:
 Accept a quest whose state is open.

Static Public Member Functions

(void) + fetchQuestWithId:completionHandler:
 Gets the data for a quest with a specified quest ID.
(void) + allQuestsWithCompletionHandler:
 Returns all quests for currently signed-in player.
(void) + questsForState:completionHandler:
 Returns quests for a specific state asynchronously.

Properties

NSString * questId
 Globally unique ID for a quest.
NSString * name
 The name of the quest.
NSString * description
 The description of the quest.
NSURL * iconUrl
 The URL leading to the image of the icon for this quest.
NSURL * bannerUrl
 The URL leading to the banner image for this quest.
GPGQuestMilestone * currentMilestone
 The latest milestone information associated with this quest.
GPGQuestState state
 The state of the quest.
long long expirationNotificationTimeStamp
 The timestamp (in milliseconds since epoch) when the user should be notified that the quest is expiring soon.
long long startTimeStamp
 The timestamp (in milliseconds since epoch) at which this quest will be available for players to accept.
long long expirationTimeStamp
 The timestamp (in milliseconds since epoch) at which this quest will expire.
long long acceptedTimeStamp
 The timestamp (in milliseconds since epoch) at which this quest was accepted by the player, or 0 if the quest has not been accepted.

Member Function Documentation

+ (void) fetchQuestWithId: (NSString *)  questId
completionHandler: (GPGQuestFetchBlock)  completionHandler 

Gets the data for a quest with a specified quest ID.

Parameters:
questIdID of the quest to fetch the data for.
completionHandlerA block in the form: ^(GPGQuest *quest, NSError *error)
+ (void) allQuestsWithCompletionHandler: (GPGQuestListBlock)  completionHandler

Returns all quests for currently signed-in player.

You can call this method to get all quests asynchronously.

Parameters:
completionHandlerA block in the form: ^(NSArray *quests, NSError *error)
+ (void) questsForState: (GPGQuestState)  state
completionHandler: (GPGQuestListBlock)  completionHandler 

Returns quests for a specific state asynchronously.

Parameters:
stateThe state of the quests to fetch.
completionHandlerA block in the form: ^(NSArray *quests, NSError *error)
- (void) acceptWithCompletionHandler: (GPGQuestCompletionBlock)  completionHandler

Accept a quest whose state is open.

Parameters:
completionHandlerA block in the form: ^(NSError *error)

Property Documentation

- (NSString*) questId [read, copy]

Globally unique ID for a quest.

- (NSString*) name [read, copy]

The name of the quest.

- (NSString*) description [read, copy]

The description of the quest.

- (NSURL*) iconUrl [read, copy]

The URL leading to the image of the icon for this quest.

- (NSURL*) bannerUrl [read, copy]

The URL leading to the banner image for this quest.

- (GPGQuestMilestone*) currentMilestone [read, assign]

The latest milestone information associated with this quest.

- (GPGQuestState) state [read, assign]

The state of the quest.

- (long long) expirationNotificationTimeStamp [read, assign]

The timestamp (in milliseconds since epoch) when the user should be notified that the quest is expiring soon.

- (long long) startTimeStamp [read, assign]

The timestamp (in milliseconds since epoch) at which this quest will be available for players to accept.

- (long long) expirationTimeStamp [read, assign]

The timestamp (in milliseconds since epoch) at which this quest will expire.

- (long long) acceptedTimeStamp [read, assign]

The timestamp (in milliseconds since epoch) at which this quest was accepted by the player, or 0 if the quest has not been accepted.

Оставить отзыв о...

Текущей странице
Play Games Services for iOS
Play Games Services for iOS