Beats Client
A CLI client and SDK for the Beats API.
Setup
Both the command line client and the SDK is packaged as a Ruby gem called "beats-client". It's available from rubygems.org, so simply install it with the gem command or using bundler:
$ gem install beats-client
Example usage
require 'beats-client'
# Create a client object
client = Beats::Client.new
# Create an authenticated client object
client = Beats::Client.new(:access_token => '...')
client.account # => { ... }
client.resource('Arthur-Russell') # => { "uri" => "Arthur-Russell", "name" => "Arthur Russell", "type" => "Artist", ... }
client.search('death metal') # => { "tracks" => [...], ... }
Development
If you want to make your own changes to beats-client, first clone the repo and run the tests:
git clone git://github.com/ProjectDaisy/beats-ruby-client.git
cd beats-ruby-client
bundle install
rake test
Contributing
Once you've made your great commits:
- Fork the repo
- Create a topic branch - git checkout -b my_branch
- Push to your branch - git push origin my_branch
- Create a Pull Request from your branch
- That's it!
Author
Copyright ©2012 Beats Music Europe AB. Created by Niklas Holmgren ([email protected]).