Class: ItunesSearch::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/itunes-search/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#search_typeObject

Returns the value of attribute search_type.



6
7
8
# File 'lib/itunes-search/base.rb', line 6

def search_type
  @search_type
end

Instance Method Details

#lookup(search_type, id, media = "all", entity = "song", limit = 50) ⇒ Object



25
26
27
# File 'lib/itunes-search/base.rb', line 25

def lookup(search_type, id, media="all", entity="song", limit=50)
  return ItunesSearch::Lookup.new(search_type, CGI::escape(id), media, entity, limit)  
end

#search(search_type, query, media = "all", entity = "allTrack", limit = 50) ⇒ Object

The following entities are available for each media type: movie: movieArtist, movie podcast: podcastAuthor, podcast music: musicArtist, musicTrack, album, musicVideo, mix, song Please note that “musicTrack” can include both songs and music videos in the results musicVideo: musicArtist, musicVideo audiobook: audiobookAuthor, audiobook shortFilm: shortFilmArtist, shortFilm tvShow: tvEpisode, tvSeason software: software, iPadSoftware, macSoftware ebook: ebook all: movie, album, allArtist, podcast, musicVideo, mix, audiobook, tvSeason, allTrack



22
23
24
# File 'lib/itunes-search/base.rb', line 22

def search(search_type, query, media="all", entity="allTrack", limit=50)
  return ItunesSearch::Search.new(search_type, CGI::escape(query), media, entity, limit)  
end