Class: Beatport::Catalog::Track
- Includes:
- Support::Url
- Defined in:
- lib/beatport/catalog/track.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Object
Returns all the tracks matching the criterea.
-
.find(key) ⇒ Object
Returns the track with the given id.
- .most_popular(options = {}) ⇒ Object
- .most_popular_for_artist(id, options = {}) ⇒ Object
- .most_popular_for_genre(id, options = {}) ⇒ Object
- .most_popular_for_label(id, options = {}) ⇒ Object
Methods included from Support::Url
Methods inherited from Item
#[], #associate, associations, find_by_name, has_many, has_one, #id, #initialize, lazy_accessor, #type
Constructor Details
This class inherits a constructor from Beatport::Item
Class Method Details
.all(options = {}) ⇒ Object
Returns all the tracks matching the criterea
24 25 26 |
# File 'lib/beatport/catalog/track.rb', line 24 def self.all( = {}) Client.retrieve 'tracks', Track, end |
.find(key) ⇒ Object
Returns the track with the given id
19 20 21 |
# File 'lib/beatport/catalog/track.rb', line 19 def self.find(key) Client.retrieve 'tracks', Track, :key => key end |
.most_popular(options = {}) ⇒ Object
28 29 30 |
# File 'lib/beatport/catalog/track.rb', line 28 def self.most_popular( = {}) Client.retrieve 'most-popular', Track, end |
.most_popular_for_artist(id, options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/beatport/catalog/track.rb', line 38 def self.most_popular_for_artist(id, = {}) [:id] = id [:collection] = true Client.retrieve "most-popular/artist", Track, end |