hotchoc

Ruby wrapper for the Hotchoc API (in private beta).

Codeship Status for choc/hotchoc-ruby Gem Version Code Climate

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

  1. Fork it
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create new Pull Request

Copyright (c) 2014-2015 Matthias Siegel. See LICENSE for details.

Changelog

See CHANGELOG for details.