Skip to content
This repository was archived by the owner on Feb 27, 2019. It is now read-only.

Rename ITunes module to Tunes#11

Open
dewski wants to merge 4 commits into
masterfrom
rename-to-tunes
Open

Rename ITunes module to Tunes#11
dewski wants to merge 4 commits into
masterfrom
rename-to-tunes

Conversation

@dewski

@dewski dewski commented Apr 18, 2012

Copy link
Copy Markdown
Owner

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

@stve

stve commented May 8, 2012

Copy link
Copy Markdown
Collaborator

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

stve commented May 8, 2012

Copy link
Copy Markdown
Collaborator

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

@dewski

dewski commented May 13, 2012

Copy link
Copy Markdown
Owner Author

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]

@stve

stve commented May 13, 2012

Copy link
Copy Markdown
Collaborator

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.

@tboyko

tboyko commented Sep 26, 2012

Copy link
Copy Markdown

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants