Sha256: ad7427e277dd26e665cf9b5649cdb5892c110b6e33cab1c5bc7845076d51af56
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
module Beatport module Catalog class Genre < Item has_many :subgenres, Genre # has_many :top_downloads, Track # has_one :slideshow, Slideshow # has_many :features, Feature has_one :counts, Item has_one :list, List def self.find(id) Client.retrieve('genres', Genre, :id => id, :subgenres => true).first end def self.all(*args) Client.retrieve('genres', Genre, *args) end def self.overview Client.retrieve('genres/overview', Genre) end def top_downloads @top_downloads ||= Track.most_popular_for_genre(id) end def slideshow @slideshow ||= Slideshow.find(id) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
beatport-0.1.1 | lib/beatport/catalog/genre.rb |