itunes icon indicating copy to clipboard operation
itunes copied to clipboard

Rename ITunes module to Tunes

Open dewski opened this issue 13 years ago • 5 comments

Just starting the renaming so it'll be ready if we decide to change the module name.

dewski avatar Apr 18 '12 22:04 dewski

On the subject of breaking changes, what do you think about removing the .results object from the response. Currently it works like this:

songs = itunes.music('green day she')
songs.results.each do |song|
  puts "#{song.track_name} - #{song.artist_name} (#{song.collection_name})"
end

I don't think the result payloads include anything worth keeping (AFAIK just a result_count which is basically the same thing as songs.size) so we could just do this instead:

songs = itunes.music('green day she')
songs.each do |song|
  puts "#{song.track_name} - #{song.artist_name} (#{song.collection_name})"
end

stve avatar May 08 '12 15:05 stve

Do you have other music services in mind to add to this?

stve avatar May 08 '12 15:05 stve

I was thinking Spotify or Last.fm would be good additions. That way you could search multiple databases (with the obvious overhead of multiple requests).

> Tunes.sources
# => [Tunes::Source::ITunes, Tunes::Source::Spotify, Tunes::Source::LastFm]
> Tunes.sources = :spotify
> Tunes.sources
# => [Tunes::Source::Spotify]
> Tunes.sources << :lastfm
# => [Tunes::Source::Spotify, Tunes::Source::LastFm]

dewski avatar May 13 '12 03:05 dewski

Sweet! This was actually one of my original motivators with this gem. In particular, I wanted to be able to search across iTunes and Amazon for availability/price. I could see a similar desire to do so with Spotify/Rdio/etc.

stve avatar May 13 '12 04:05 stve

+1 for @spagalloco point on "flattening" .results!

tboyko avatar Sep 26 '12 16:09 tboyko