Skip to content

ns/RemoteModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Easy to use ActiveRecord-like interface to make RESTful API calls

Below is a summary of the most available methods.

  • (id)initWithBaseURL:(NSString*)aBaseUrl;

  • (void)findAll;

  • (void)findOne:(NSString*)anId;

  • (void)create:(NSDictionary*)params;

  • (void)update:(NSString*)anId params:(NSDictionary*)params;

  • (void)destroy:(NSString*)anId;

  • (void)actionOnResource:(NSString*)anId action:(NSString*)anAction postParams:(NSDictionary*)params;

  • (void)get:(NSString*)url;

  • (void)post:(NSString*)url postParams:(NSDictionary*)postParams;

  • (void)setCompletionBlock:(RemoteModelBasicBlock)aCompletionBlock;

  • (void)setFailedBlock:(RemoteModelBasicBlock)aFailedBlock;

  • (void)signWithApiToken:(NSString*)anApiToken;

  1. Automatic Reference Counting (ARC) needs to be enabled.

  2. Install ASIHTTPRequest allseeing-i.com/ASIHTTPRequest/Setup-instructions

  3. Install SBJson stig.github.com/json-framework/

  4. Drag & Drop the two files into your Xcode project.

  5. Enjoy

  • Simple RESTful methods for the basic stuff (findOne, findAll, create, update, delete).

  • Built on top of ASIHTTPRequest & SBJson.

  • Response is automatically parsed with SBJson.

  • Callbacks using blocks - no need for tons of extra methods.

  • Method to sign all requests with an API token for authentication.

About

IOS5 class to make API access easier.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors