h1. restr

h3. Copyright (c) 2008 Urbacon Ltd.

h2. What is it?

<b>Restr is a very simple client for "RESTful":http://en.wikipedia.org/wiki/Representational_State_Transfer web services.</b> 
It was developed as a lightweight alternative to "ActiveResource":http://api.rubyonrails.com/files/vendor/rails/activeresource/README.html.

For project info and downloads please see the Restr's 
"RubyForge Page":http://rubyforge.org/projects/restr

h2. Installing

<pre syntax="ruby">sudo gem install restr</pre>

h2. Usage Example

Fetch Kitten with id 1 and print out its name and colour:

<pre syntax="ruby">
require 'restr'
kitten = Restr.get('http://example.com/kittens/1.xml')
puts kitten['name']
puts kitten['colour']
</pre>

Change the Kitten's colour and store the modification:

<pre syntax="ruby">
kitten['colour'] = 'black'
kitten = Restr.put('http://example.com/kittens/1.xml', kitten)
</pre>

h2. Further Resources

* "Full API Documentation RDocs":http://restr.rubyforge.org/rdoc/
* "Reststop":http://rubyforge.org/projects/reststop/ -- makes it easy to implement RESTful controllers in the Camping microframework
* "Wikipedia Article on REST":http://en.wikipedia.org/wiki/Representational_State_Transfer 

h2. How to submit patches

* See below for author's contact info.
* The trunk repository is <code>svn://rubyforge.org/var/svn/restr/trunk</code> for anonymous access.

h2. License

* "Lesser GPL Version 3":http://www.gnu.org/licenses/lgpl.html

h2. Contact

* "Author's Rubyforge Page":http://rubyforge.org/users/gunark/
* "Restr RubyForge Forum":http://rubyforge.org/forum/?group_id=5848
