Sha256: df0754e5d017132b28bb9e94eee1ee1f5c99bef61714f6c2fd9ee281c60efb8f
Contents?: true
Size: 951 Bytes
Versions: 16
Compression:
Stored size: 951 Bytes
Contents
## Getting Started Add fanforce-api to your Gemfile ``` ruby gem 'fanforce-api' ``` Require fanforce/api and initialize an instance ``` ruby require 'fanforce/api' # Initialize a new Fanforce::API instance with your api_key ff = Fanforce::API.new('00000000-0000-0000-0000-000000000000') ``` ## Making Your First Call Get your organization details... ``` ruby ff.get('/organization') ``` ## Handling Results response.result response.results response.total_results response.current_results response.current_page response.total_pages ## Paging response.prev_url response.next_url ## Logging By default logging is turned off. ```ruby Fanforce::API.config do |config| config.logging = true end ``` ## Error Handling ```ruby begin ff.get('/nonexistent_method') rescue Fanforce::API::Error => e puts e.curl_command end ``` ## More Information Visit the Fanforce Developers site to explore the full API access methods available.
Version data entries
16 entries across 16 versions & 1 rubygems