getfivestars_api 1.0.3 → 1.0.4

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/auth_token.rb CHANGED
@@ -12,7 +12,7 @@ module GetFiveStars
12
12
  request.set('clientId', @client_id)
13
13
  token = ""
14
14
  request.get_parameters.sort.map do |key,value|
15
- token += key + value
15
+ token += key.to_s + value.to_s
16
16
  end
17
17
  request.set('hash', Digest::SHA256.hexdigest(@private_key + token))
18
18
  end
@@ -1,4 +1,5 @@
1
1
  require 'request'
2
+ require 'json_request'
2
3
  require 'response'
3
4
  require 'auth_token'
4
5
  require 'net_client'
@@ -0,0 +1,11 @@
1
+ require 'json'
2
+
3
+ module GetFiveStars
4
+ module Api
5
+ class JsonRequest < GetFiveStars::Api::Request
6
+ def initialize(action, json)
7
+ super(action, JSON.parse(json))
8
+ end
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getfivestars_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -21,6 +21,7 @@ files:
21
21
  - lib/response.rb
22
22
  - lib/getfivestars_api.rb
23
23
  - lib/request.rb
24
+ - lib/json_request.rb
24
25
  - lib/auth_token.rb
25
26
  homepage: https://www.getfivestars.com
26
27
  licenses: