referly 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,8 @@ module Referly
4
4
  @client = client
5
5
  end
6
6
 
7
- def create(options={})
8
- @client.post('/accounts', options)['account_id']
7
+ def create(params={})
8
+ @client.post('/accounts', params)['account_id']
9
9
  end
10
10
  end
11
11
  end
@@ -6,15 +6,15 @@ module Referly
6
6
  base_uri 'https://refer.ly/api/120701'
7
7
 
8
8
  def initialize(key, secret)
9
- self.class.basic_auth key, secret
9
+ @auth = { username: key, password: secret }
10
10
  end
11
11
 
12
- def post(path, options)
13
- self.class.post(path, body: options)
12
+ def post(path, params)
13
+ self.class.post(path, body: params, basic_auth: @auth)
14
14
  end
15
15
 
16
- def get(path, options)
17
- self.class.get(path, query: options)
16
+ def get(path, params)
17
+ self.class.get(path, query: params, basic_auth: @auth)
18
18
  end
19
19
 
20
20
  def accounts
@@ -4,12 +4,12 @@ module Referly
4
4
  @client = client
5
5
  end
6
6
 
7
- def all(options={})
8
- @client.get('/links', options).parsed_response
7
+ def all(params={})
8
+ @client.get('/links', params)['links']
9
9
  end
10
10
 
11
11
  def create(params={})
12
- @client.post('/links', options).parsed_response
12
+ @client.post('/links', params).parsed_response
13
13
  end
14
14
  end
15
15
  end
@@ -4,12 +4,12 @@ module Referly
4
4
  @client = client
5
5
  end
6
6
 
7
- def all(options={})
8
- @client.get('/rewards', options).parsed_response
7
+ def all(params={})
8
+ @client.get('/rewards', params).parsed_response
9
9
  end
10
10
 
11
- def create(options={})
12
- @client.post('/rewards', options).parsed_response
11
+ def create(params={})
12
+ @client.post('/rewards', params).parsed_response
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Referly
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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: &70215830749780 !ruby/object:Gem::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: *70215830749780
24
+ version_requirements: *70135413172600
25
25
  description: A Ruby wrapper for the Referly API.
26
26
  email:
27
27
  - maxstoller@gmail.com