Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A rest-client wrapper providing basic CRUD for resources
Ruby
tag: v0.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
tasks
.gitignore
.rspec
.rvmrc
.travis.yml
Gemfile
Gemfile.lock
README.md
Rakefile
rest_resource.gemspec

README.md

rest_resource -- rest-client gem wrapper to provide a simple CRUD interface

Build Status

DESCRIPTION

The gem provides a basic CRUD operation to the resources. It is basically rest-client wrapper. Once you use it, you have find, create, update and delete (Currently I implemented only find and create)

USAGE

Given you need to fetch user from a web service. You can write:

class User < RestResource::Resource
   class << self
     def url
       "http://www.example.com/users"
     end
   end
end

To use it, you can just do:

User.find 1

User.create :name => "Leslie Cheung", :login => "singer"

Both operation assume your web service controller returns a json string which can be initialized into an object.

Contributors

  • Yi Wen
Something went wrong with that request. Please try again.