README.md in beatport-0.2.0 vs README.md in beatport-0.2.1
- old
+ new
@@ -1,25 +1,25 @@
# Beatport
-A ruby gem for accessing the Beatport API
+[![Dependency Status](https://gemnasium.com/mateomurphy/beatport.png)](https://gemnasium.com/mateomurphy/beatport)
-http://api.beatport.com
+A ruby gem for accessing the Beatport API; currently incomplete and only supports the Catalog API, but under development.
-Currently incomplete, but under development.
+https://oauth-api.beatport.com/docs/
-[![Dependency Status](https://gemnasium.com/mateomurphy/beatport.png)](https://gemnasium.com/mateomurphy/beatport)
-
## Oauth
Beatport's api now requires authentication via Oauth. This means you now need to provide the gem
-you oauth credentials to make requests, for example in a rails initializer:
+your oauth credentials to make requests, for example in a rails initializer:
Beatport.consumer_key = 'consumer_key'
Beatport.consumer_secret = 'consumer_secret'
Beatport.access_token_key = 'access_token_key'
Beatport.access_token_secret = 'access_token_secret'
+Your consumer key and secret are found in the API Keys section of your beatbort account, whereas the access token key and secret can be generated at the docs page.
+
## Facets
Many queries to beatport support facets, but they aren't properly documentated on their site. These are the ones I've found so far:
* genreName
@@ -40,12 +40,11 @@
query[0].id # => returns the Beatport id of the artist
query[1].class # => second result is a Beatport.Catalog::Chart object
query[1].publish_date # => returns the published date of the Chart
- # Note that search results change frequently, so first result may not
- necessarily be a Beatport::Catalog::Artist object
+ # Note that search results change frequently, so first result may not necessarily be a Beatport::Catalog::Artist object
# Find top downloads for a given genre
genres = Beatport::Catalog::Genre.all # => list all genres
# display each genre and its corresponding Beatport genre slug
@@ -64,9 +63,14 @@
# => find the name of the #1 downloaded Electro House track
# An alternative for searching for genre by slug is searching by genre ID
trance_genre = Beatport::Catalog::Genre.find(7) # => returns a Trance Genre object
```
+
+## Running specs
+
+To run specs, you'll need to create a file with your oauth credentials in `spec/config.rb`, which
+will be loaded by `spec/spec_helper.rb`
## Contributing to beatport
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it