Sha256: 323f0a45a20b95e87fc1b6d47aa96fc15873b51f6a3321e398f7ed7d4eb00cc8
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
# voog.rb Ruby toolkit for the [Voog](http://www.voog.com) API. Learn more at the [Voog developer central](http://www.voog.com/developers/api) and by reading the [Voog API documentation](http://www.voog.com/developers/api). ## Getting started Either add this line to your application's `Gemfile`: ``` gem 'voog_api' ``` And then execute: ``` $ bundle ``` Or install it yourself as: ``` $ gem install voog_api ``` ## API token To generate your personal **API token** for your site, go to `Account` -> `My profile` and click on "Generate new API token". ## Initializing the client All requests to the Voog API are done through the `Voog::Client` class, which takes two parameters: site host and API token. ```ruby client = Voog::Client.new('example.com', 'afcf30182aecfc8155d390d7d4552d14') ``` Making an API request is as simple as calling a single method on the client: ```ruby client.layouts ``` Most responses from the client are `Response` objects that provide access to the API resource objects by using both dot and hash notation: ```ruby layout = client.layout(1) puts layout.title # => "Front page" puts layout[:title] # => "Front page" ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voog_api-0.0.7 | README.markdown |