-
-
Save longlongjump/1029252 to your computer and use it in GitHub Desktop.
enter touch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////////////////////////////////// | |
// touch enter club | |
-(void)testEnterClub | |
{ | |
ClubEntrance *entrance = [ClubEntrance entry]; | |
entrance.userId = @"13"; | |
entrance.clubId = @"13"; | |
entrance.location = CLLocationCoordinate2DMake(42.730881,-74.000893); | |
entrance.radius = 100; | |
ASIHTTPRequest *req = [[self statusOnServcie] enterClubWithEntrance:entrance | |
delegate:self | |
finishSelector:@selector(enterFinished:) | |
failSelector:@selector(enterFailed:)]; | |
req; | |
} | |
-(void)enterFinished:(StatusOnRequest*)req | |
{ | |
NSLog(@"enter club with id%@",[[req dictResponse] objectForKey:@"club_id"]); | |
} | |
-(void)enterFailed:(StatusOnRequest*)req | |
{ | |
NSLog(@"enter club %@",[req error]); | |
} | |
////////////////////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////////////////////// | |
// get club | |
-(void)testGetClub | |
{ | |
ASIHTTPRequest *req = [[self statusOnServcie] clubWithId:@"13" | |
delegate:self | |
finishSelector:@selector(clubGetFinished:) | |
failSelector:@selector(clubGetFailed:)]; | |
req; | |
} | |
-(void)clubGetFinished:(StatusOnRequest*)req | |
{ | |
NSLog(@"club: %@",[req dictResponse]); | |
} | |
-(void)clubGetFailed:(StatusOnRequest*)req | |
{ | |
NSLog(@"enter club %@",[req error]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment