Sha256: 92eca5cb9b1ce4db833039e1cb2384d6ba99fa9d2b8c4b01171cb7d26a0896f0
Contents?: true
Size: 927 Bytes
Versions: 1
Compression:
Stored size: 927 Bytes
Contents
module RSpotify class Track < Base def self.find(id) super(id, 'track') end def self.search(query, limit = 20, offset = 0) super(query, 'track', limit, offset) end def initialize(options = {}) @available_markets = options['available_markets'] @disc_number = options['disc_number'] @duration_ms = options['duration_ms'] @explicit = options['explicit'] @external_ids = options['external_ids'] @name = options['name'] @popularity = options['popularity'] @preview_url = options['preview_url'] @track_number = options['track_number'] if options['album'] @album = Album.new options['album'] end if options['artists'] artists = options['artists'] @artists = artists.map { |a| Artist.new a } end super(options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspotify-0.4.0 | lib/rspotify/track.rb |