Created
November 26, 2014 14:51
-
-
Save tjstankus/4998dc95fa080b654977 to your computer and use it in GitHub Desktop.
Grooveshark example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'grooveshark' | |
client = Grooveshark::Client.new | |
session = client.session | |
songs = client.search_songs('Nirvana') | |
puts "Number of results -- #{songs.size}" | |
songs.each do |song| | |
puts song.name | |
end | |
url = client.get_song_url(songs.first) | |
puts "Copy and paste this URL into your browser and it should play: " + url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment