Sha256: 5016e599813242c1affd08d56cbe72e2d137c628f00f4c082f5e383dad458fff

Contents?: true

Size: 711 Bytes

Versions: 1

Compression:

Stored size: 711 Bytes

Contents

require 'selfies'
require 'itunes_api/configuration'
require 'itunes_api/requests/all'
require 'itunes_api/music/all'

# Interface to the Itunes Api
module ItunesApi
  BASE_URL = 'https://itunes.apple.com'.freeze
  LIMIT = 200

  def self.artist_ids(name, store = default_store)
    Requests::Search.artist_ids(name, store)
  end

  def self.artist_lookup(artist_id, store = default_store)
    Music::ArtistLookup.artist(artist_id, store)
  end

  def self.artist_search(name, store = default_store)
    Music::ArtistSearch.artists(name, store)
  end

  def self.configure
    yield(Configuration.instance)
  end

  private

  def self.default_store
    Configuration.instance.country_code rescue :gb
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
itunes_api-1.0.0 lib/itunes_api.rb