1.0.2 • Published 9 years ago

resource.js v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

Resource.js

Create HTTP API clients with ease

Usage:

var $         = require('jquery');
var resource  = requrie('resource')({
  // Must provide your own http interface
  http: $.ajax
});

// Setup your api
var api = resource('http:/localhost:3000/api');
api.users = api('users');
api.books = api('books');

api.users.get(123, function( error, user ){
  
});

var bob = api.users(123);

bob.put( { interest: ['Having fun'] }, function( error, user ){
  
});

Install:

bower install resource
npm install resource

Docs COMING SOON!