referly 0.0.2 → 0.0.3
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/lib/referly/account_proxy.rb +2 -2
- data/lib/referly/client.rb +5 -5
- data/lib/referly/link_proxy.rb +3 -3
- data/lib/referly/reward_proxy.rb +4 -4
- data/lib/referly/version.rb +1 -1
- metadata +3 -3
data/lib/referly/client.rb
CHANGED
@@ -6,15 +6,15 @@ module Referly
|
|
6
6
|
base_uri 'https://refer.ly/api/120701'
|
7
7
|
|
8
8
|
def initialize(key, secret)
|
9
|
-
|
9
|
+
@auth = { username: key, password: secret }
|
10
10
|
end
|
11
11
|
|
12
|
-
def post(path,
|
13
|
-
self.class.post(path, body:
|
12
|
+
def post(path, params)
|
13
|
+
self.class.post(path, body: params, basic_auth: @auth)
|
14
14
|
end
|
15
15
|
|
16
|
-
def get(path,
|
17
|
-
self.class.get(path, query:
|
16
|
+
def get(path, params)
|
17
|
+
self.class.get(path, query: params, basic_auth: @auth)
|
18
18
|
end
|
19
19
|
|
20
20
|
def accounts
|
data/lib/referly/link_proxy.rb
CHANGED
@@ -4,12 +4,12 @@ module Referly
|
|
4
4
|
@client = client
|
5
5
|
end
|
6
6
|
|
7
|
-
def all(
|
8
|
-
@client.get('/links',
|
7
|
+
def all(params={})
|
8
|
+
@client.get('/links', params)['links']
|
9
9
|
end
|
10
10
|
|
11
11
|
def create(params={})
|
12
|
-
@client.post('/links',
|
12
|
+
@client.post('/links', params).parsed_response
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/referly/reward_proxy.rb
CHANGED
@@ -4,12 +4,12 @@ module Referly
|
|
4
4
|
@client = client
|
5
5
|
end
|
6
6
|
|
7
|
-
def all(
|
8
|
-
@client.get('/rewards',
|
7
|
+
def all(params={})
|
8
|
+
@client.get('/rewards', params).parsed_response
|
9
9
|
end
|
10
10
|
|
11
|
-
def create(
|
12
|
-
@client.post('/rewards',
|
11
|
+
def create(params={})
|
12
|
+
@client.post('/rewards', params).parsed_response
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/referly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: referly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-24 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70135413172600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70135413172600
|
25
25
|
description: A Ruby wrapper for the Referly API.
|
26
26
|
email:
|
27
27
|
- maxstoller@gmail.com
|