Reputation: 1382
So I'm brand new to rest's API and have never used an API ever before. I'm ok with Objective-C and Cocoa Touch but just have no clue where to start when accessing the API and how to in general. Can someone help me get started with some code that will access titles in rest or just how to access a REST API in general with authentication. Thanks.
Upvotes: 3
Views: 2077
Reputation: 6617
Take a look at RestKit: http://restkit.org/
It features a high level object mapping framework that can turn remote RESTful responses back into local objects declaratively, handling all the parsing and mapping for you.
Upvotes: 1
Reputation: 19462
http://github.com/mirek/NSMutableDictionary-REST.framework is easy to use.
To get REST as dictionary from GitHub API as an example:
NSString *url = @"http://github.com/api/v2/xml/user/search/mirek";
[NSMutableDictionary dictionaryWithRESTContentsOfURL: url];
To post:
[myDict postRESTWithURL: @"http://localhost:3000/my-rest"];
It supports sync/async, intuitive array conversions, url encoded and multipart posts (you can send images and other files).
Upvotes: 0