Skip to content
yokoe edited this page Jul 26, 2011 · 1 revision

Table of Contents

Configuration

To use items in your game, create categories and items in the admin site. Every item should belong to a category.

API

Acquiring item

Increase the quantity of owned item by:

[Pankia acquireItemSynchronously:1 quantity:10 onSuccess:^(int64_t newQuantity) {
    NSLog(@"Increased");
} onFailure:^(NSError* error) {
    NSLog(@"Error. %@", error);
}];

Consuming item

Decrease by:

[Pankia consumeItemSynchronously:1 quantity:10 onSuccess:^(int64_t newQuantity) {
    NSLog(@"Decreased");
} onFailure:^(NSError* error) {
    NSLog(@"Error. %@", error);
}];

Getting quantity of item

NSLog(@"quanity of item 1: %lld", [Pankia quantityOfItem:1]);

Clone this wiki locally