officialfm 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,28 +35,6 @@ this gem, see [ofmtweet](https://github.com/nddrylliog/ofmtweet).
35
35
 
36
36
  ## Additions to the original API
37
37
 
38
- ### playlist.tracks
39
-
40
- For the time being, the structure of playlists in the JSON response of the official.fm
41
- server is:
42
-
43
- {
44
- "tracks_count":4,
45
- "tracks_list":"57854,40057,11290,12818",
46
- }
47
-
48
- It'd be more convenient to have something like:
49
-
50
- {
51
- "tracks": [ 57854, 40057, 11290, 12818 ],
52
- }
53
-
54
- But until it's fixed, this gem emulates it, so you can still write pretty code like:
55
-
56
- officialfm.playlists('R&B', :limit => 1)[0].tracks.do |track|
57
- puts " * #{officialfm.track(track).title}"
58
- end
59
-
60
38
  ### playlist.running\_time
61
39
 
62
40
  The original API has a `length` attribute in playlists, but unfortunately
data/changelog.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.4 May 20, 2011
4
+ * Removed 'tracks' workaround, as the official API now includes it by default
5
+
3
6
  ## 0.0.3 May 18, 2011
4
7
  * Added support for voted_playlists and voted_tracks requests
5
8
 
@@ -46,8 +46,6 @@ module OfficialFM
46
46
  def improve(playlist)
47
47
  # the length field is already used. Note: running_time is in seconds
48
48
  playlist.running_time = playlist["length"]
49
- # Our own little hack to make it a lot easier to handle, until the API is improved.
50
- playlist.tracks = playlist.tracks_list.split(',').map do |x| x.to_i end
51
49
  playlist
52
50
  end
53
51
 
@@ -1,3 +1,3 @@
1
1
  module OfficialFM
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: officialfm
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
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-05-18 00:00:00 +02:00
13
+ date: 2011-05-20 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency