Skip to content

Instantly share code, notes, and snippets.

@longlongjump
Created June 16, 2011 13:44
Show Gist options
  • Save longlongjump/1029252 to your computer and use it in GitHub Desktop.
Save longlongjump/1029252 to your computer and use it in GitHub Desktop.
enter touch
//////////////////////////////////////////////////////////////////////////////////////////
// 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