hotchoc
Ruby wrapper for the Hotchoc API (in private beta).
Installation
Add this line to your application's Gemfile:
gem 'hotchoc'
And then execute:
$ bundle
Or install it manually as:
$ gem install hotchoc
Usage
client = Hotchoc::Client.new(
api_key: 'abcde', # Your API key
site: 'mysite' # Short name of your site
)
Examples
# Get single album by ID
client.get_albums(id: '77774dc8-4edf-4b3a-8571-a6b64c8adace')
=> [#<Hotchoc::Album: title="Test album 1">]
# Get all albums
client.get_albums
=> [#<Hotchoc::Album: title="Test album 2">, #<Hotchoc::Album: title="Test album 1">]
# Get only first 10 albums
client.get_albums(limit: 10)
=> [#<Hotchoc::Album: title="Test album 2">, #<Hotchoc::Album: title="Test album 1">]
API
Get collection
client.get_albums
client.get_pages
client.get_posts
client.get_topics
Contributing
- Fork it
- Create your feature branch
- Commit your changes
- Push to the branch
- Create new Pull Request
Copyright
Copyright (c) 2014-2015 Matthias Siegel. See LICENSE for details.
Changelog
See CHANGELOG for details.