grooveshark-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +133 -91
- data/VERSION +1 -1
- data/grooveshark-ruby.gemspec +74 -0
- metadata +4 -3
data/README.md
CHANGED
@@ -1,91 +1,133 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
1
|
+
# Grooveshark Ruby
|
2
|
+
|
3
|
+
Grooveshark Ruby is an unofficial wrapper for the [Grooveshark API](http://developers.grooveshark.com/docs/public_api/v3/).
|
4
|
+
|
5
|
+
## Getting started
|
6
|
+
|
7
|
+
You can install Grooveshark Ruby with the following command,
|
8
|
+
|
9
|
+
`gem install grooveshark-ruby`
|
10
|
+
|
11
|
+
Before you can invoke any of the methods, make sure to require the gem,
|
12
|
+
|
13
|
+
`require 'grooveshark-ruby`
|
14
|
+
|
15
|
+
Most of the commands seen here require an API key which can be requested through the website. Please refer to the API for information on which methods require a key. Start a new session with,
|
16
|
+
|
17
|
+
`derp = Grooveshark.new(key, secret)`
|
18
|
+
|
19
|
+
If you do not have a key or secret, simply use `''` for both of them. Again, I have no idea which methods require a key, so you're best to simply request one. There are 3 different ways to authenticate a user, though the website seems to recommend:
|
20
|
+
|
21
|
+
`derp.authenticate('username', 'password')`
|
22
|
+
|
23
|
+
From this point you can make requests to the Grooveshark server. For example,
|
24
|
+
|
25
|
+
`derp.getPopularSongsToday`
|
26
|
+
|
27
|
+
will return a list of the day's popular songs.
|
28
|
+
|
29
|
+
As always, don't forget to logout,
|
30
|
+
|
31
|
+
`a.logout`
|
32
|
+
|
33
|
+
|
34
|
+
## Does it work or not? A list of methods
|
35
|
+
|
36
|
+
The lists below are a near-complete collection of methods offered by the [API](http://developers.grooveshark.com/docs/public_api/v3/). The method names are verbatim with the API page. Methods that aren't included on the website are not included in this gem for now - presumably because they don't work properly. The full list can be found by invoking `getServiceDescription`.
|
37
|
+
|
38
|
+
For more information on the methods and their parameters, please refer to the API.
|
39
|
+
|
40
|
+
#### Added by myself and required to create a token
|
41
|
+
|
42
|
+
- makeToken(username, password)
|
43
|
+
|
44
|
+
#### Working
|
45
|
+
|
46
|
+
- startSession (automatically invoked with Grooveshark.new)
|
47
|
+
- authenticate
|
48
|
+
- authenticateUser
|
49
|
+
- authenticateToken
|
50
|
+
- logout
|
51
|
+
- getCountry
|
52
|
+
- getUserPlaylists
|
53
|
+
- getUserPlaylistsSubscribed
|
54
|
+
- getUserFavoriteSongs
|
55
|
+
- removeUserFavoriteSongs
|
56
|
+
- getUserInfo
|
57
|
+
- unsubscribePlaylist
|
58
|
+
- getPlaylist
|
59
|
+
- getServiceDescription
|
60
|
+
- pingService
|
61
|
+
- getPlaylistInfo
|
62
|
+
- getSongIDFromTinysongBase62
|
63
|
+
- getSongURLFromTinysongBase62
|
64
|
+
- getSongURLFromSongID
|
65
|
+
- getPlaylistURLFromPlaylistID
|
66
|
+
- getTinysongURLFromSongID
|
67
|
+
- getUserLibrarySongs
|
68
|
+
- removeUserLibrarySongs
|
69
|
+
- deletePlaylist
|
70
|
+
- getUserIDFromUsername
|
71
|
+
- getAlbumsInfo
|
72
|
+
- getAlbumSongs
|
73
|
+
- getSongsInfo
|
74
|
+
- getDoesAlbumExist
|
75
|
+
- getDoesSongExist
|
76
|
+
- getDoesArtistExist
|
77
|
+
- getArtistPopularSongs
|
78
|
+
- getArtistAlbums
|
79
|
+
|
80
|
+
#### Sorta working
|
81
|
+
|
82
|
+
These methods are working, but with awkward glitches.
|
83
|
+
|
84
|
+
- addUserFavoriteSong (sometimes returns false, which seems to be fixed by adding or removing []-brackets)
|
85
|
+
- getPopularSongsToday (setting limit to anything doesn't work)
|
86
|
+
- getPopularSongsMonth (setting limit to anything doesn't work)
|
87
|
+
- createPlaylist (songIDs has to be passed in as an array, i.e. [songIDs], even if it's a single song)
|
88
|
+
- getArtistsInfo (returns an empty array unless argument is passed in as an array)
|
89
|
+
- getArtistVerifiedAlbums (returns a list of albums, most of them with the property `"IsVerified"=>false`??)
|
90
|
+
|
91
|
+
#### Not working
|
92
|
+
|
93
|
+
The following methods are not working at all and it is unclear whether this is the fault of the wrapper or the API itself. More testing is required.
|
94
|
+
|
95
|
+
- addUserLibrarySongs (returns `"success"=> true` but doesn't actually add songs to anything)
|
96
|
+
- subscribePlaylist (just returns `"success"=> false` with no explanation?)
|
97
|
+
- undeletePlaylist (just returns `"success"=> false` with no explanation?)
|
98
|
+
|
99
|
+
#### Not enough permissions with standard API key
|
100
|
+
|
101
|
+
These methods are not aloud by standard API key holders. See the [API](http://developers.grooveshark.com/docs/public_api/v3/) for information on how you can increase your permissions
|
102
|
+
|
103
|
+
- getAutoplaySong
|
104
|
+
- getAutoplayTags
|
105
|
+
- startAutoplayTag
|
106
|
+
- startAutoplay
|
107
|
+
- removeVoteUpAutoplaySong
|
108
|
+
- voteUpAutoplaySong
|
109
|
+
- addSongToAutoplay
|
110
|
+
- removeSongFromAutoplay
|
111
|
+
- removeVoteDownAutoplaySong
|
112
|
+
- voteDownAutoplaySong
|
113
|
+
- getUserPlaylistsByUserID
|
114
|
+
- getUserInfoFromUserID
|
115
|
+
- getSimilarArtists
|
116
|
+
- registerUser
|
117
|
+
- getUserSubscriptionDetails
|
118
|
+
|
119
|
+
#### Not tested
|
120
|
+
|
121
|
+
- getAutocompleteSearchResults
|
122
|
+
- getSubscriberStreamKey
|
123
|
+
- markStreamKeyOver30Secs
|
124
|
+
- markSongComplete
|
125
|
+
- getTrialInfo
|
126
|
+
- createTrial
|
127
|
+
- setPlaylistSongs
|
128
|
+
- getPlaylistSongs
|
129
|
+
- renamePlaylist
|
130
|
+
|
131
|
+
## Credits
|
132
|
+
|
133
|
+
Much of the code to post requests to the grooveshark server is based off of [a now outdated grooveshark gem by sosedoff](https://github.com/sosedoff/grooveshark/).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "grooveshark-ruby"
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Gabriel Scholz"]
|
12
|
+
s.date = "2012-10-12"
|
13
|
+
s.description = "An easy-to-use ruby wrapper for the Grooveshark API"
|
14
|
+
s.email = "scholz.gabe@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.md",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"grooveshark-ruby.gemspec",
|
28
|
+
"lib/grooveshark-ruby.rb",
|
29
|
+
"lib/grooveshark-ruby/autocomplete.rb",
|
30
|
+
"lib/grooveshark-ruby/autoplay.rb",
|
31
|
+
"lib/grooveshark-ruby/core.rb",
|
32
|
+
"lib/grooveshark-ruby/new.rb",
|
33
|
+
"lib/grooveshark-ruby/recs.rb",
|
34
|
+
"lib/grooveshark-ruby/register.rb",
|
35
|
+
"lib/grooveshark-ruby/request.rb",
|
36
|
+
"lib/grooveshark-ruby/search.rb",
|
37
|
+
"lib/grooveshark-ruby/sessions.rb",
|
38
|
+
"lib/grooveshark-ruby/subscriberstreams.rb",
|
39
|
+
"lib/grooveshark-ruby/tinysong.rb",
|
40
|
+
"lib/grooveshark-ruby/trials.rb",
|
41
|
+
"lib/grooveshark-ruby/urls.rb",
|
42
|
+
"lib/grooveshark-ruby/users.rb"
|
43
|
+
]
|
44
|
+
s.homepage = "http://github.com/garbles/grooveshark-ruby"
|
45
|
+
s.licenses = ["MIT"]
|
46
|
+
s.require_paths = ["lib"]
|
47
|
+
s.rubygems_version = "1.8.24"
|
48
|
+
s.summary = "An easy-to-use ruby wrapper for the Grooveshark API"
|
49
|
+
|
50
|
+
if s.respond_to? :specification_version then
|
51
|
+
s.specification_version = 3
|
52
|
+
|
53
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
56
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
58
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
61
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
64
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
65
|
+
end
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
68
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
69
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
70
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
71
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grooveshark-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gabriel Scholz
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- README.md
|
108
108
|
- Rakefile
|
109
109
|
- VERSION
|
110
|
+
- grooveshark-ruby.gemspec
|
110
111
|
- lib/grooveshark-ruby.rb
|
111
112
|
- lib/grooveshark-ruby/autocomplete.rb
|
112
113
|
- lib/grooveshark-ruby/autoplay.rb
|