songdrop 0.1.16 → 0.1.17
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.
- checksums.yaml +4 -4
- data/lib/songdrop/client.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14fe1dd59f07b6acfcea28d7233cf8505241d6ea
|
|
4
|
+
data.tar.gz: 327028ce37643beeaf4ff19f21b702701f6a640b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14114116f6815822378c9f2e35892647031c5480c50b60bd4eb0e1f82d8a57c777a943c45d66b1f1b28ef8b9808342cfdaa756b6adc48da2829e16b3be029e59
|
|
7
|
+
data.tar.gz: 61777a812e9f64646a350f618068390e9e79bd5e8ee11fc5133e957263f911d92ca9ce48d717cb03a8f4f02fe75c24b694536acad79180014cab473ac4b31fc0
|
data/lib/songdrop/client.rb
CHANGED
|
@@ -6,11 +6,12 @@ module Songdrop
|
|
|
6
6
|
@token = options[:token]
|
|
7
7
|
@endpoint = options[:endpoint] || 'https://songdrop.com/v1'
|
|
8
8
|
@auth_token = options[:auth_token]
|
|
9
|
+
@ip_address = options[:ip_address] # if the client is proxying for the user
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def get(path, params={}, &block)
|
|
12
13
|
puts "[Songdrop::Client] GET #{path} with #{params.inspect} block? #{block_given?}"
|
|
13
|
-
params.merge!(:client => @token, :token => @auth_token)
|
|
14
|
+
params.merge!(:client => @token, :token => @auth_token, :ip => @ip_address)
|
|
14
15
|
HTTP.get(full_url(path), params) do |response, headers, error|
|
|
15
16
|
handle_response(response, headers, error, &block)
|
|
16
17
|
end
|
|
@@ -18,7 +19,7 @@ module Songdrop
|
|
|
18
19
|
|
|
19
20
|
def put(path, params={}, &block)
|
|
20
21
|
puts "[Songdrop::Client] PUT #{path} with #{params.inspect} block? #{block_given?}"
|
|
21
|
-
params.merge!(:client => @token, :token => @auth_token)
|
|
22
|
+
params.merge!(:client => @token, :token => @auth_token, :ip => @ip_address)
|
|
22
23
|
HTTP.put(full_url(path), params) do |response, headers, error|
|
|
23
24
|
handle_response(response, headers, error, &block)
|
|
24
25
|
end
|
|
@@ -26,7 +27,7 @@ module Songdrop
|
|
|
26
27
|
|
|
27
28
|
def post(path, params={}, &block)
|
|
28
29
|
puts "[Songdrop::Client] POST #{path} with #{params.inspect} block? #{block_given?}"
|
|
29
|
-
params.merge!(:client => @token, :token => @auth_token)
|
|
30
|
+
params.merge!(:client => @token, :token => @auth_token, :ip => @ip_address)
|
|
30
31
|
HTTP.post(full_url(path), params) do |response, headers, error|
|
|
31
32
|
handle_response(response, headers, error, &block)
|
|
32
33
|
end
|
|
@@ -34,7 +35,7 @@ module Songdrop
|
|
|
34
35
|
|
|
35
36
|
def delete(path, params={}, &block)
|
|
36
37
|
puts "[Songdrop::Client] DELETE #{path} with #{params.inspect} block? #{block_given?}"
|
|
37
|
-
params.merge!(:client => @token, :token => @auth_token)
|
|
38
|
+
params.merge!(:client => @token, :token => @auth_token, :ip => @ip_address)
|
|
38
39
|
HTTP.delete(full_url(path), params) do |response, headers, error|
|
|
39
40
|
handle_response(response, headers, error, &block)
|
|
40
41
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: songdrop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Taylor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-08-
|
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: songdrop is a Ruby & RubyMotion client for the Songdrop.com API.
|
|
14
14
|
email: moomerman@gmail.com
|