Sha256: 615980933d887cc06307523be9bbeb4d8815f5d91d4817bab4ba6d1cfb4f53ce

Contents?: true

Size: 766 Bytes

Versions: 6

Compression:

Stored size: 766 Bytes

Contents

module Beatport
  module Catalog
    class Label < Item
      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

6 entries across 6 versions & 1 rubygems

Version Path
beatport-0.2.0 lib/beatport/catalog/label.rb
beatport-0.1.10 lib/beatport/catalog/label.rb
beatport-0.1.9 lib/beatport/catalog/label.rb
beatport-0.1.8 lib/beatport/catalog/label.rb
beatport-0.1.7 lib/beatport/catalog/label.rb
beatport-0.1.6 lib/beatport/catalog/label.rb