Sha256: 2c9f4dfabab56c3875e6d7585a27aee9a10c10919f50b9b3630c4533ea91c56b

Contents?: true

Size: 789 Bytes

Versions: 5

Compression:

Stored size: 789 Bytes

Contents

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

      has_many :genres, Genre
      has_many :subgenres, Genre
      has_many :top_downloads, Track
      has_many :featured_releases, Release
      has_many :most_popular_releases, Release
      has_one :images, Images

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

        def featured(*args)
          Client.retrieve 'featured/labels', Label, *args
        end

        def find(*args)
          Client.retrieve 'labels', Label, *args
        end

        def name_facet
          :label_name
        end
      end

      def releases(options)
        options[:label_id] = id
        Release.all(options)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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