jberkel-spotify-api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +42 -41
- data/VERSION.yml +2 -2
- data/bin/spotify-api-server +9 -7
- data/spotify-api.gemspec +2 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -20,47 +20,48 @@ At the moment the following features are implemented:
|
|
20
20
|
|
21
21
|
Prerequisites: *Java 6+*, JRuby 1.3.x.
|
22
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
|
-
|
23
|
+
$ jruby -S gem sources -a http://gems.github.com # (you only have to do this once)
|
24
|
+
$ jruby -S gem install jberkel-spotify-api
|
25
|
+
$ jruby -S spotify-api-server --account login:password
|
26
|
+
== Sinatra/0.9.4 has taken the stage on 3000 for development with backup from WEBrick
|
27
|
+
[2009-08-04 01:21:03] INFO WEBrick 1.3.1
|
28
|
+
[2009-08-04 01:21:03] INFO ruby 1.8.6 (2009-07-24) [java]
|
29
|
+
[2009-08-04 01:21:03] INFO WEBrick::HTTPServer#start: pid=12162 port=3000
|
30
|
+
|
31
|
+
$ curl http://localhost:3000/playlists | jsonpretty
|
32
|
+
{
|
33
|
+
"result": {
|
34
|
+
"playlists": [
|
35
|
+
{
|
36
|
+
"name": "my shiny playlist",
|
37
|
+
"author": "jberkel",
|
38
|
+
"url": "http:\/\/open.spotify.com\/user\/jberkel\/playlist\/5EXLGE7HPVPjvlxPmIfrDe",
|
39
|
+
"revision": 2,
|
40
|
+
"id": "b9fe3dcf88945d146ef18117faa61ab4",
|
41
|
+
"tracks": [
|
42
|
+
{
|
43
|
+
"artist": "Elmore Judd",
|
44
|
+
"title": "Disco In 4 Pieces",
|
45
|
+
"url": "http:\/\/open.spotify.com\/track\/1VaucR6Bsks5Q9bYBsXvuF",
|
46
|
+
"id": "3f2752a98dd947c5855278a88159d7b1",
|
47
|
+
"album": "Insect Funk",
|
48
|
+
"popularity": 0.325379997491837
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"artist": "40winks",
|
52
|
+
"title": "Goodmorning (intro)",
|
53
|
+
"url": "http:\/\/open.spotify.com\/track\/6qHiOf1BFCQIzAjJsRbMfY",
|
54
|
+
"id": "d34a3a6daeed4f93983068e4e8c26cd6",
|
55
|
+
"album": "Sound Puzzle",
|
56
|
+
"popularity": 0.170609995722771
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"collaborative": false
|
60
|
+
}
|
61
|
+
]
|
62
|
+
},
|
63
|
+
"status": "OK"
|
64
|
+
}
|
64
65
|
|
65
66
|
See examples directory for usage.
|
66
67
|
|
data/VERSION.yml
CHANGED
data/bin/spotify-api-server
CHANGED
@@ -12,13 +12,15 @@ def usage
|
|
12
12
|
exit(1)
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
while arg = ARGV.shift do
|
16
|
+
case arg
|
17
|
+
when '-p', '--port': port = ARGV.shift
|
18
|
+
when '--account':
|
19
|
+
login, password = ARGV.shift.to_s.split(':')
|
20
|
+
raise ArgumentError, "you need to specify both login and password!" unless login and password
|
21
|
+
Jotify.credentials = { :username=>login, :password=>password }
|
22
|
+
when '-h', '--help': usage
|
23
|
+
end
|
22
24
|
end
|
23
25
|
|
24
26
|
#Sinatra::Application.set :environment, :production
|
data/spotify-api.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{spotify-api}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jan Berkel"]
|
9
|
-
s.date = %q{2009-08-
|
9
|
+
s.date = %q{2009-08-05}
|
10
10
|
s.default_executable = %q{spotify-api-server}
|
11
11
|
s.description = %q{an api for spotify, based on jotify}
|
12
12
|
s.email = %q{jan.berkel@gmail.com}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jberkel-spotify-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Berkel
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-05 00:00:00 -07:00
|
13
13
|
default_executable: spotify-api-server
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|