Permalink
Browse files

Updated README with more info mime-type formats and the Resource class

  • Loading branch information...
1 parent e06802f commit e4ba735a84a0ad896384297725a65efa530756e7 @bulkan bulkan committed Nov 8, 2010
Showing with 8 additions and 2 deletions.
  1. +8 −2 README.markdown
View
10 README.markdown
@@ -42,7 +42,9 @@ Connection options:
### POST request
Nestful.post 'http://example.com', :format => :form #=> "body"
-
+
+other supported mime-type formats are :json, :multipart, :xml
+
### Parameters
Nestful.get 'http://example.com', :params => {:nestled => {:params => 1}}
@@ -55,8 +57,12 @@ Connection options:
### Resource
+The Resource class provides a single object to work with restful services. The following example does a GET request to the URL; http://example.com/assets/1/
+
Nestful::Resource.new('http://example.com')['assets'][1].get(:format => :xml) #=> {:xml_hash => 1}
+The Resource class also supports, post, json_post and json_get methods.
+
### Buffer download, return Tempfile
Nestful.get 'http://example.com/file.jpg', :buffer => true #=> <File ...>
@@ -79,4 +85,4 @@ Nestful uses ROAuth for OAuth support - check out supported options: http://gith
Nestful.get 'http://example.com', :oauth => {}
## Credits
- Large parts of the connection code were taken from ActiveResource
+ Large parts of the connection code were taken from ActiveResource

0 comments on commit e4ba735

Please sign in to comment.