This repository has been archived by the owner on Aug 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Burgestrand edited this page Jan 23, 2012
·
31 revisions
Hallons’ examples are actual examples that connect to Spotify. My goal with them is to provide, well, examples of how the API should be used. To run them, you’ll need:
- a spotify premium user
- a spotify application key
These credentials are expected to be stored in environment variables for the examples. Personally, I set them using a configuration file inside spec/support/config.rb
. The environment variables are:
- HALLON_USERNAME (spotify username)
- HALLON_PASSWORD (spotify password)
- HALLON_APPKEY (path to spotify application key)
This is what my personal configuration file looks like (without my username and password ;)):
ENV['HALLON_USERNAME'] = ''
ENV['HALLON_PASSWORD'] = ''
ENV['HALLON_APPKEY'] = File.expand_path('~/.spotify_appkey.key')
The examples will try to require this file. So, to run the examples you’ll want to have the above file containing this data (or remove the require of the ./spec/support/config.rb
in the examples). You then run them, from Hallons root directory, using the following command:
ruby examples/logging_in.rb