Sha256: 6ca89d736233d83b6105aade610bdd2deb8c9aab8ecbbe41579423e79ccb28c3

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

module Beatport
  module Catalog
    class Artist < Item
      has_many :genres, Genre
      has_many :subgenres, Genre
      has_one :images, Images
      has_many :top_downloads, Track
#      has_many :featured_releases, Release

      class << self
        def all(options = {})
          Client.retrieve 'artists', Artist, options
        end

        def find(*args)
          Client.retrieve 'artists', Artist, *args
        end

        def name_facet
          :artist_name
        end
      end
    
      def top_downloads(options = {})
        Track.most_popular_for_artist(id, options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
beatport-0.2.0 lib/beatport/catalog/artist.rb
beatport-0.1.10 lib/beatport/catalog/artist.rb
beatport-0.1.9 lib/beatport/catalog/artist.rb
beatport-0.1.8 lib/beatport/catalog/artist.rb