Class: FreeMusicArchive::Client

Inherits:
Object
  • Object
show all
Includes:
Albums, Artists, Curators, Genres, Tracks, Request
Defined in:
lib/freemusicarchive/client.rb,
lib/freemusicarchive/client/albums.rb,
lib/freemusicarchive/client/genres.rb,
lib/freemusicarchive/client/tracks.rb,
lib/freemusicarchive/client/artists.rb,
lib/freemusicarchive/client/curators.rb

Defined Under Namespace

Modules: Albums, Artists, Curators, Genres, Tracks

Instance Method Summary collapse

Methods included from Tracks

#tracks

Methods included from Genres

#genres

Methods included from Curators

#curators

Methods included from Artists

#artists

Methods included from Albums

#albums

Methods included from Request

#get

Constructor Details

#initialize(attrs = {}) ⇒ FreeMusicArchive::Client

Initializes a new API object

Parameters:

  • attrs (Hash) (defaults to: {})


22
23
24
25
26
27
# File 'lib/freemusicarchive/client.rb', line 22

def initialize(attrs={})
  attrs = FreeMusicArchive.options.merge(attrs)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    instance_variable_set("@#{key}".to_sym, attrs[key])
  end
end