Skip to content

Instantly share code, notes, and snippets.

View mmesarina's full-sized avatar

Malena Mesarina mmesarina

View GitHub Profile
@mmesarina
mmesarina / gist:3b25553f52f8e0312bcb
Created October 17, 2014 02:27
TipCalculator Screen Shots
https://github.com/thecodepath/ios_tipster
@mmesarina
mmesarina / gist:a7fe2c1fd77de9f42567
Last active August 29, 2015 14:07
Rottentomatoes API to get list of current movies in theaters
NSString *url = @"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?apikey=ws32mxpd653h5c8zqfvksxw9";
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
id object = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
self.movies = object[@"movies"];
[self.tableView reloadData];
NSLog(@"%@", object);
}];