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
(function($) { | |
window.Insight = Backbone.Model.extend({ | |
view: function(index) { | |
//return this.get('innovations')[index]; | |
console.log(this.get('innovations')[index]); | |
} | |
}); | |
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
- (void)viewDidLoad | |
{ | |
NSError *error = nil; | |
// Prepare URL request to JSON call... | |
NSURLRequest *request = [NSURLRequest requestWithURL: | |
[NSURL URLWithString: | |
@"http://reviewapp/items.json"]]; | |
NSData *response = [NSURLConnection |
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
NSURL *apiURL = [NSURL URLWithString:@"http://api.stackoverflow.com/1.1/questions?tagged=objective-c&pagesize=30"]; | |
NSError *error = nil; | |
// First option - failed | |
NSInputStream *inputStream = [NSInputStream inputStreamWithURL:apiURL]; // returning nil | |
id jsonFound1 = [NSJSONSerialization JSONObjectWithStream:inputStream options:NSJSONReadingMutableContainers error:&error]; |
NewerOlder