Sha256: 213845733cc9cfc99f430490d2dde5d3ff0f9fb083a43db7584a777f5a1917c5

Contents?: true

Size: 650 Bytes

Versions: 5

Compression:

Stored size: 650 Bytes

Contents

module Beatport
  module Catalog
    class Artist < Item
      include Support::Url

      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

5 entries across 5 versions & 1 rubygems

Version Path
beatport-0.4.0 lib/beatport/catalog/artist.rb
beatport-0.3.0 lib/beatport/catalog/artist.rb
beatport-0.2.3 lib/beatport/catalog/artist.rb
beatport-0.2.2 lib/beatport/catalog/artist.rb
beatport-0.2.1 lib/beatport/catalog/artist.rb