Sha256: a9c2b4c04b0c6351334b2a279732f42be971ba51e0f264e13dc911912fafe79d

Contents?: true

Size: 728 Bytes

Versions: 5

Compression:

Stored size: 728 Bytes

Contents

module Beatport
  module Catalog  
    class Chart < Item
      has_one :audio_format_fee, AudioFormatFee      
      has_many :genres, Genre
      has_one :images, Images
      has_one :price, Price
      has_many :tracks, Track
    
      def self.find(*keys)
        Client.retrieve 'charts', Chart, *keys
      end
  
      def self.all(options = {})
        Client.retrieve 'charts', Chart, options
      end    
    
      def self.overview
        ChartOverview.get
      end
    
      def self.featured(*args)
        Client.retrieve 'featured/charts', Chart, *args
      end
      
      def tracks(options = {})
        options[:chart_id] = id
        @tracks ||= Track.all(options)
      end
      
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
beatport-0.1.7 lib/beatport/catalog/chart.rb
beatport-0.1.6 lib/beatport/catalog/chart.rb
beatport-0.1.5 lib/beatport/catalog/chart.rb
beatport-0.1.3 lib/beatport/catalog/chart.rb
beatport-0.1.2 lib/beatport/catalog/chart.rb