Sha256: 158cb3a0c456a19e4c5d016b17a6de32d2e40923431256623eec4d38953497e1
Contents?: true
Size: 659 Bytes
Versions: 6
Compression:
Stored size: 659 Bytes
Contents
module ItunesApi module Requests # Fetch all the artist ids corresponding to a search term class Search include Base attr_reader_init :artist_name, :store selfie :artist_ids def artist_ids results.collect do |result| result['artistId'] end.compact.uniq.sort end private def action 'search' end def query { attribute: 'artistTerm', entity: 'album', term: @artist_name, country: store.to_s.upcase, limit: LIMIT, media: 'music', sort: 'recent' } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems