Sha256: 773e8fb51c740528fbc4ee28335a35702584b3cdbea280a9858cb92697cc6adb
Contents?: true
Size: 575 Bytes
Versions: 1
Compression:
Stored size: 575 Bytes
Contents
module RSpotify class Album < Base attr_accessor :album_type, :images, :name, :tracks def self.find(id) super(id, 'album') end def self.search(query, limit = 20, offset = 0) super(query, 'album', limit, offset) end def initialize(options = {}) @album_type = options['album_type'] @images = options['images'] @name = options['name'] if options['tracks'] tracks = options['tracks']['items'] @tracks = tracks.map { |t| Track.new t } end super(options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspotify-0.2.0 | lib/rspotify/album.rb |