officialfm 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +8 -3
- data/changelog.md +8 -1
- data/lib/officialfm/playlists.rb +2 -2
- data/lib/officialfm/version.rb +1 -1
- data/lib/officialfm.rb +0 -1
- data/officialfm.gemspec +4 -5
- metadata +20 -31
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# official.fm
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ruby wrapper for the [official.fm Simple API](http://official.fm/developers).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -12,13 +12,18 @@ Be sure and get your API key: [http://official.fm/developers/manage](http://offi
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Include the relevant files
|
|
16
|
+
|
|
17
|
+
require 'rubygems'
|
|
18
|
+
require 'officialfm'
|
|
16
19
|
|
|
20
|
+
### Instantiate a client
|
|
21
|
+
|
|
17
22
|
officialfm = OfficialFM::Client.new(:api_key => 'your_api_key')
|
|
18
23
|
|
|
19
24
|
#### Examples
|
|
20
25
|
|
|
21
|
-
officialfm.user('chab')
|
|
26
|
+
user = officialfm.user('chab')
|
|
22
27
|
puts user.name
|
|
23
28
|
|
|
24
29
|
officialfm.tracks('Dare', {:limit => 10, :embed => false}).each |track| do
|
data/changelog.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## 0.0.2 April 21, 2011
|
|
4
|
+
* s/Unofficial/Official, this gem is now endorsed by official.fm
|
|
5
|
+
* Playlist IDs no longer escaped
|
|
6
|
+
* Removed dependency on OAuth2, as it's not needed for the Simple API
|
|
7
|
+
* Better README
|
|
8
|
+
|
|
9
|
+
## 0.0.1 March 22, 2011
|
|
4
10
|
* Initial version
|
|
5
11
|
* Supports tracks, users, playlists
|
|
6
12
|
* Improved playlist support: tracks, running_time
|
|
13
|
+
|
data/lib/officialfm/playlists.rb
CHANGED
|
@@ -24,7 +24,7 @@ module OfficialFM
|
|
|
24
24
|
# @return [Hashie::Mash] Playlist
|
|
25
25
|
def playlist(playlist_id, options={})
|
|
26
26
|
response = connection.get do |req|
|
|
27
|
-
req.url "/playlist/#{
|
|
27
|
+
req.url "/playlist/#{playlist_id}",
|
|
28
28
|
:api_embed_codes => options[:embed]
|
|
29
29
|
end
|
|
30
30
|
improve(response.body[0])
|
|
@@ -32,7 +32,7 @@ module OfficialFM
|
|
|
32
32
|
|
|
33
33
|
# Retrieve users that have voted for this playlist
|
|
34
34
|
#
|
|
35
|
-
# @param [String]
|
|
35
|
+
# @param [String] playlist_id: id
|
|
36
36
|
# @param [Integer] limit (50) limit per page
|
|
37
37
|
# @return [Hashie::Mash] User list
|
|
38
38
|
def playlist_votes(playlist_id, options={})
|
data/lib/officialfm/version.rb
CHANGED
data/lib/officialfm.rb
CHANGED
data/officialfm.gemspec
CHANGED
|
@@ -5,15 +5,14 @@ Gem::Specification.new do |s|
|
|
|
5
5
|
s.name = 'officialfm'
|
|
6
6
|
s.version = OfficialFM::VERSION
|
|
7
7
|
s.authors = ["Amos Wenger"]
|
|
8
|
-
s.email = ['
|
|
9
|
-
s.summary = %q{
|
|
10
|
-
s.description = %q{
|
|
11
|
-
s.homepage = 'http://github.com/
|
|
8
|
+
s.email = ['amos@official.fm']
|
|
9
|
+
s.summary = %q{Official Ruby bindings for the official.fm API}
|
|
10
|
+
s.description = %q{Official Ruby bindings for the official.fm API}
|
|
11
|
+
s.homepage = 'http://github.com/officialfm/officialfm-ruby'
|
|
12
12
|
|
|
13
13
|
s.add_runtime_dependency 'faraday', '~> 0.5.3'
|
|
14
14
|
s.add_runtime_dependency 'faraday_middleware', '~> 0.3.0'
|
|
15
15
|
s.add_runtime_dependency 'hashie', '~> 1.0.0'
|
|
16
|
-
s.add_runtime_dependency 'oauth2', '~> 0.1.0'
|
|
17
16
|
|
|
18
17
|
s.add_development_dependency 'bundler', '~> 1.0'
|
|
19
18
|
s.add_development_dependency 'fakeweb', '~> 1.3'
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: officialfm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Amos Wenger
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-04-21 00:00:00 +02:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -46,97 +46,86 @@ dependencies:
|
|
|
46
46
|
version: 1.0.0
|
|
47
47
|
type: :runtime
|
|
48
48
|
version_requirements: *id003
|
|
49
|
-
- !ruby/object:Gem::Dependency
|
|
50
|
-
name: oauth2
|
|
51
|
-
prerelease: false
|
|
52
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
|
53
|
-
none: false
|
|
54
|
-
requirements:
|
|
55
|
-
- - ~>
|
|
56
|
-
- !ruby/object:Gem::Version
|
|
57
|
-
version: 0.1.0
|
|
58
|
-
type: :runtime
|
|
59
|
-
version_requirements: *id004
|
|
60
49
|
- !ruby/object:Gem::Dependency
|
|
61
50
|
name: bundler
|
|
62
51
|
prerelease: false
|
|
63
|
-
requirement: &
|
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
64
53
|
none: false
|
|
65
54
|
requirements:
|
|
66
55
|
- - ~>
|
|
67
56
|
- !ruby/object:Gem::Version
|
|
68
57
|
version: "1.0"
|
|
69
58
|
type: :development
|
|
70
|
-
version_requirements: *
|
|
59
|
+
version_requirements: *id004
|
|
71
60
|
- !ruby/object:Gem::Dependency
|
|
72
61
|
name: fakeweb
|
|
73
62
|
prerelease: false
|
|
74
|
-
requirement: &
|
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
75
64
|
none: false
|
|
76
65
|
requirements:
|
|
77
66
|
- - ~>
|
|
78
67
|
- !ruby/object:Gem::Version
|
|
79
68
|
version: "1.3"
|
|
80
69
|
type: :development
|
|
81
|
-
version_requirements: *
|
|
70
|
+
version_requirements: *id005
|
|
82
71
|
- !ruby/object:Gem::Dependency
|
|
83
72
|
name: jnunemaker-matchy
|
|
84
73
|
prerelease: false
|
|
85
|
-
requirement: &
|
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
|
86
75
|
none: false
|
|
87
76
|
requirements:
|
|
88
77
|
- - ~>
|
|
89
78
|
- !ruby/object:Gem::Version
|
|
90
79
|
version: "0.4"
|
|
91
80
|
type: :development
|
|
92
|
-
version_requirements: *
|
|
81
|
+
version_requirements: *id006
|
|
93
82
|
- !ruby/object:Gem::Dependency
|
|
94
83
|
name: json_pure
|
|
95
84
|
prerelease: false
|
|
96
|
-
requirement: &
|
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
|
97
86
|
none: false
|
|
98
87
|
requirements:
|
|
99
88
|
- - ~>
|
|
100
89
|
- !ruby/object:Gem::Version
|
|
101
90
|
version: "1.4"
|
|
102
91
|
type: :development
|
|
103
|
-
version_requirements: *
|
|
92
|
+
version_requirements: *id007
|
|
104
93
|
- !ruby/object:Gem::Dependency
|
|
105
94
|
name: rake
|
|
106
95
|
prerelease: false
|
|
107
|
-
requirement: &
|
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
|
108
97
|
none: false
|
|
109
98
|
requirements:
|
|
110
99
|
- - ~>
|
|
111
100
|
- !ruby/object:Gem::Version
|
|
112
101
|
version: "0.8"
|
|
113
102
|
type: :development
|
|
114
|
-
version_requirements: *
|
|
103
|
+
version_requirements: *id008
|
|
115
104
|
- !ruby/object:Gem::Dependency
|
|
116
105
|
name: shoulda
|
|
117
106
|
prerelease: false
|
|
118
|
-
requirement: &
|
|
107
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
|
119
108
|
none: false
|
|
120
109
|
requirements:
|
|
121
110
|
- - ~>
|
|
122
111
|
- !ruby/object:Gem::Version
|
|
123
112
|
version: "2.11"
|
|
124
113
|
type: :development
|
|
125
|
-
version_requirements: *
|
|
114
|
+
version_requirements: *id009
|
|
126
115
|
- !ruby/object:Gem::Dependency
|
|
127
116
|
name: test-unit
|
|
128
117
|
prerelease: false
|
|
129
|
-
requirement: &
|
|
118
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
|
130
119
|
none: false
|
|
131
120
|
requirements:
|
|
132
121
|
- - ~>
|
|
133
122
|
- !ruby/object:Gem::Version
|
|
134
123
|
version: "2.1"
|
|
135
124
|
type: :development
|
|
136
|
-
version_requirements: *
|
|
137
|
-
description:
|
|
125
|
+
version_requirements: *id010
|
|
126
|
+
description: Official Ruby bindings for the official.fm API
|
|
138
127
|
email:
|
|
139
|
-
-
|
|
128
|
+
- amos@official.fm
|
|
140
129
|
executables: []
|
|
141
130
|
|
|
142
131
|
extensions: []
|
|
@@ -177,7 +166,7 @@ files:
|
|
|
177
166
|
- test/tracks_test.rb
|
|
178
167
|
- test/users_test.rb
|
|
179
168
|
has_rdoc: true
|
|
180
|
-
homepage: http://github.com/
|
|
169
|
+
homepage: http://github.com/officialfm/officialfm-ruby
|
|
181
170
|
licenses: []
|
|
182
171
|
|
|
183
172
|
post_install_message:
|
|
@@ -203,7 +192,7 @@ rubyforge_project:
|
|
|
203
192
|
rubygems_version: 1.6.2
|
|
204
193
|
signing_key:
|
|
205
194
|
specification_version: 3
|
|
206
|
-
summary:
|
|
195
|
+
summary: Official Ruby bindings for the official.fm API
|
|
207
196
|
test_files:
|
|
208
197
|
- test/fixtures/charts.json
|
|
209
198
|
- test/fixtures/latest.json
|