Skip to content
kenn edited this page Dec 29, 2010 · 2 revisions

PankiaNet

Class methods

Initializer

+ (void)initWithGameKey:(NSString*)gameKey gameSecret:(NSString*)secret title:(NSString*)title delegate:(id)delegate;

Initialize PankiaNet. Usually you should call this right after application launch.

At the same time, it attempts to login automatically. When it's successful, userDidLogin: will get called. When the user is not registered yet, a sign up screen will show up.

Dashboard

+ (void)setDashboardOrientation:( UIInterfaceOrientation)orientation;

Set orientation of dashboard. Right now, UIInterfaceOrientationLandscapeLeft and UIInterfaceOrientationLandscapeRight are supported.

+ (void)launchDashboard;

Show the dashboard. when it's being displayed, dashboardWillAppear and dashboardDidAppear will get called.

In case you want to show a specific view instead of the top view, use the following methods as appropriate.

+ (void)launchDashboardWithLeaderboardsView;
+ (void)launchDashboardWithAchievementsView;
+ (void)launchDashboardWithFindFriendsView;
+ (void)launchDashboardWithNearbyMatchView;
+ (void)launchDashboardWithInternetMatchView;
+ (void)launchDashboardWithSettingsView;
+ (void)launchDashboardWithEditProfileView;
+ (void)launchDashboardWithSecureAccountView;
+ (void)launchDashboardWithSwitchAccountView;
+ (void)launchDashboardWithMyProfileView;
+ (void)launchDashboardWithUsersProfileView:(NSString*)username;
+ (void)launchDashboardWithInvitedRoomsView;
+ (void)launchDashboardWithInternetMatchRoom:(PNRoom*)room;
+ (void)dismissDashboard;

Close the dashboard. When it's being closed, dashboardWillDisappear and dashboardDidDisappear will get called.

Achievements

+ (void)fetchAchievements;
+ (void)fetchUnlockedAchievements;
+ (void)unlockAchievement:(int)achievementId;
+ (void)unlockAchievements:(NSArray*)achievementsToUnlock;
+ (BOOL)isAchievementUnlocked:(int)achievementId;

Leaderboards

+ (void)fetchLeaderboards;
+ (void)fetchRankOnLeaderboard:(int)leaderboardId;
+ (void)fetchAllLeaderboardsRank;
+ (void)postScore:(long long int)score leaderboardId:(int)leaderboardId delta:(BOOL)delta;

Others

+ (BOOL)isLoggedIn;
+ (BOOL)isTwitterLinked;
+ (void)followUserByName:(NSString*)username;
+ (void)postTweet:(NSString*)tweet;
Clone this wiki locally