Advertisement
Guest User

(C) i3Software 2012

a guest
Feb 7th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(void)testFacepunchAPI {
  2.     FPAPI *apiInstance = [FPAPI sharedInstance];
  3.     [apiInstance authenticateWithUsername:@"i300" password:@"colbert2012" andCallbackDelegate:self];
  4. }
  5.  
  6. // Called when Authentication is completed
  7. -(void)facepunchAPIAuthenticationComletedWithPayload:(NSDictionary *)payload {
  8.     FPAPI *apiInstance = [FPAPI sharedInstance];`
  9.     [apiInstance getForumsWithCurrentSessionAndCallbackDelegate:self];
  10. }
  11.  
  12. // Called when GetForums is completed
  13. -(void)facepunchGetForumsCompletedWithForums:(NSArray *)forums {
  14.     FPCategory *firstCategory = [forums objectAtIndex:0];
  15.     NSLog(@"The first category returned by the API is: %@", firstCategory.name);
  16.  
  17.     // Outputs
  18.     // The first category returned by the API is: General Discussion
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement