Sha256: 98c5596be511d79c936d8d8f78e0d84f10652e2503631a0bfe41f5d3a63a88a9
Contents?: true
Size: 1.08 KB
Versions: 31
Compression:
Stored size: 1.08 KB
Contents
## Install Via rubygems.org: ``` $ gem install fanforce ``` To build and install the development branch yourself from the latest source: ``` $ git clone git@github.com:mlabs/fanforce-ruby.git $ cd fanforce-ruby $ git checkout master $ rake gem $ gem install pkg/fanforce-{version} ``` ## Getting Started ### Set It Up ``` ruby require 'rubygems' # not necessary with ruby 1.9 but included for completeness require 'fanforce' # put your own credentials here api_key = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' # set up a client to talk to the Fanforce API @ff = Fanforce.new api_key ``` ### Making Your First Call ``` ruby # get your api access info @ff.get('/access_info', {}) ``` ## Full REST Access ### GET ``` ruby ff.get('/', {}) ``` ### POST ``` ruby ff.post('/', {}) ``` ### PUT ``` ruby ff.put('/', {}) ``` ### DELETE ``` ruby ff.delete('/') ``` ## Error Handling begin rescue Fanforce::Error => e end e.curl_command e.response_code e.response_body e.request_url e.request_params ## More Information Visit the Fanforce Developers site to explore the full API access methods available.
Version data entries
31 entries across 31 versions & 1 rubygems