artsy/doppler — pull request #79 by dblock (2014-11-25 22:06:13+00:00)
Title: @joeyAghion => Documented collection items.

The collection items API is fairly straightforward, here's how to add an artwork to a collection, in Ruby, for example:

```ruby
require 'hyperclient'

# access token should be obtained via OAuth
api = Hyperclient.new('http://localhost:3000/api') do |api|
api.headers['Accept'] = 'application/vnd.artsy-v2+json'
api.headers['X-Access-Token'] = '...'
end

# retrieve current user
current_user = api.current_user

# fetch the user's default collection
collection = api.collections(user_id: current_user.id, default: true, private: true).first

# add an artwork to the collection
artwork = api.artworks.first
collection.collection_items._post(artwork_id: artwork.id)
```