SptyAPI
Ruby wrapper for Spotify's Web API.
Note: Gem is still in early developmental stages and not ready for use.
Installation
Add this line to your application's Gemfile:
gem 'spty_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install spty_api
Usage
Configure the gem
Put this in your initializer
Spty.configure do |config|
config.client_id = '<your client id>'
config.secret_key = '<your secret key>'
end
The gem only support 'Client Credentials Flow' authorization for now. Support for the 'Authorization Code Flow' will be added in later versions.
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run
bundle exec rake spec
to run the tests. You can also run bin/console
for an
interactive prompt that will allow you to experiment.
Run VCR_RECORD=true bundle exec rake spec
to re-record the VCR cassettes. This
will make the test hit the actual API and VCR will record the response. You will
need to setup your credentials first in order to the test to get the correct
result.
To setup your credentials, copy the file spec/spec_config_helper.sample.rb
to
spec/spec_config_helper.rb
and add your API client_id
and secret_key
.
You don't need to record new VCR cassettes, unless you are adding the new endpoint are that the API response has change.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/jibone/spty_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the SptyAPI project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.