Sha256: 9e2130942d675274116cf43ba77acbdd1e01a2219067848e47c9269ee193b846
Contents?: true
Size: 1.25 KB
Versions: 6
Compression:
Stored size: 1.25 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 ```ruby begin ff.get('/bad_page') rescue Fanforce::Error => e puts e.curl_command end ``` e.curl_command e.response_code e.response_body e.request_url e.request_params BadRequestError ## Utils ff.curl_command(method, path, query_params) ff.url(path, query_params) ff.validate_auth ## More Information Visit the Fanforce Developers site to explore the full API access methods available.
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
fanforce-0.5.2 | README.md |
fanforce-0.5.1 | README.md |
fanforce-0.5.0 | README.md |
fanforce-0.4.9 | README.md |
fanforce-0.4.8 | README.md |
fanforce-0.4.7 | README.md |