Skip to content

Instantly share code, notes, and snippets.

@eliaskg
Created November 6, 2009 13:18
Show Gist options
  • Save eliaskg/227982 to your computer and use it in GitHub Desktop.
Save eliaskg/227982 to your computer and use it in GitHub Desktop.
- (void)searchYoutube:(id)sender
{
var query = encodeURI([sender objectValue]);
var request = [CPURLRequest requestWithURL:"http://gdata.youtube.com/feeds/api/videos?alt=json-in-script&callback=callback&q=" + query];
var connection = [CPJSONPConnection sendRequest:request callback:"callback" delegate:self];
}
- (void)connection:(CPJSONPConnection)aConnection didReceiveData:(CPString)data
{
[self showSearchResults:data];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment