bookafy 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e79247bfc577518a6f5dc209a7eede9821873d6e
4
- data.tar.gz: c94c4f0f675bed22dd80cc22e7e722ce7d913c38
3
+ metadata.gz: 22f85093f29633ce1ebd8fda5421fe096ec33185
4
+ data.tar.gz: 4ab6e2135b425dc4abfc483afac7ee68b6c86d8a
5
5
  SHA512:
6
- metadata.gz: 919c151342cc33101f955fb55d4dbb7af96fea306c8816e511d668ab972f4295de446a8458d5367e155e55dacb14c27400b85aa79d23feafdf46f17ec9596b2f
7
- data.tar.gz: f8c762a0fb12c5d8b63027c3cb8da4e2743f0938095002682db45f7e8dbcdb43b9c930f2289c54e8cdbd81c08cffa553219fb2f9fba086f6be19279725eb4499
6
+ metadata.gz: 9c322e21898a035923786b0832394c9261b136070d8c3ac552610c6a190d082c95b7127fb043bd3c18cc1dfcd7d17132718a2fa4b4f59abda8772041659a75f7
7
+ data.tar.gz: 185980d5a91605cab05e6961409bbc8f395a3cef0cd8163498242e87915a7803f26c41453b4b26f9519afdf704d14e667835c2a05713fd32f1af594ab10ed0a8
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Bookafy::Rails
1
+ # Bookafy
2
2
 
3
3
  This is a gem that enables you to get customer and appointment data from [Bookafy](http://www.bookafy.com/).
4
4
 
@@ -9,7 +9,7 @@ module Bookafy
9
9
  def initialize
10
10
  url = Bookafy.base_url || 'http://bookafydev.com'
11
11
  @domain = "#{url}/api/#{API_VERSION}/"
12
- @token = Bookafy.access_token
12
+ @client_token = Bookafy.client_token
13
13
  end
14
14
 
15
15
  def bookafy_api_url
@@ -17,13 +17,13 @@ module Bookafy
17
17
  end
18
18
 
19
19
  def access_token
20
- @token
20
+ @client_token
21
21
  end
22
22
 
23
23
  def get(url, options={})
24
- default_options = {token: @token, page: 1}.merge(options)
24
+ default_options = {token: @client_token, page: 1}.merge(options)
25
25
  api_url = "#{@domain}#{url}"
26
- response = HTTParty.get(api_url, {query: default_options})
26
+ response = HTTParty.get(api_url, {query: default_options, headers: {'Authorization' => "Bearer #{Bookafy.access_token}"}})
27
27
  response
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module Bookafy
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
data/lib/bookafy.rb CHANGED
@@ -10,10 +10,12 @@ module Bookafy
10
10
 
11
11
  @base_url = 'http://bookafydev.com'
12
12
  @access_token = ''
13
+ @client_token = ''
13
14
 
14
15
  class << self
15
16
  attr_accessor :base_url
16
17
  attr_accessor :access_token
18
+ attr_accessor :client_token
17
19
  end
18
20
 
19
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookafy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Bajalovic