rdio 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/rdio.rb +5 -0
  2. data/lib/rdio/api.rb +3 -0
  3. data/lib/rdio/base.rb +1 -1
  4. metadata +3 -3
@@ -50,6 +50,11 @@ module Rdio
50
50
  @api = Api.new key,secret
51
51
  end
52
52
 
53
+ # Resets shared API to nil
54
+ def reset
55
+ @api = nil
56
+ end
57
+
53
58
  # Returns the shared Rdio::Api instance. If it hasn't been set, we
54
59
  # try to construct it from thte environment
55
60
  def self.api
@@ -90,6 +90,9 @@ module Rdio
90
90
  cls = type
91
91
  args = {:keys=>keys(objs)}
92
92
  json = call method,args
93
+ if Rdio::log_json
94
+ Rdio::log "json: #{json}"
95
+ end
93
96
  create_object type,json,true
94
97
  end
95
98
 
@@ -40,7 +40,7 @@ module Rdio
40
40
  end
41
41
 
42
42
  def keys(objs)
43
- objs.map {|x| x.to_k}
43
+ objs.map {|x| x.to_k}.join ','
44
44
  end
45
45
 
46
46
  # object -> value
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeffrey Palm