Skip to content

Instantly share code, notes, and snippets.

@tjstankus
Created November 26, 2014 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjstankus/4998dc95fa080b654977 to your computer and use it in GitHub Desktop.
Save tjstankus/4998dc95fa080b654977 to your computer and use it in GitHub Desktop.
Grooveshark example
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