fatsecret_lite 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3176512cd1f08db8d7c8985e23ad46b1546b3af468318cd2feaade0238a8288
4
- data.tar.gz: ec4f1b4c028b300595c3ee11db90950e3dcebea85bfe2134cfbf85d885228ff7
3
+ metadata.gz: c0924759e4dc52520a8ba072c3ed7403279f09209f7a9f9a3d3e12ee5d62fe43
4
+ data.tar.gz: d12122964da73e71fd1d09e4d3a6fbcc2a88fcc3641f8430cc029772f48924b4
5
5
  SHA512:
6
- metadata.gz: bb1ae96afde72d54aef2fa26d000777be4295ce24d39db3db9a154c69e13149d8002e111792c03745df4110e3da7e393ceb2c787baefd7c13a45da0c228e306a
7
- data.tar.gz: e7960007a37e73ba936b382928c8ae37643713539e95d025b2df1ce692050e20eb96f002b99c62da692e639098d3cc9537e186a7373c4ed1aabc31fef3239559
6
+ metadata.gz: '0191eb1af3c3d91f5e6ee1a85216e6de35977c21342f67ec808cf4e14cbf62c0e1fafa573e4fc1b3da33ff8231e29a3165f1d23a088b7a6a8743dfa155d2da9f'
7
+ data.tar.gz: a7c03c77ead8c1df7386e77d352a23c952185c8606034901b0710bd803d54e277f699d80a7bb532cb7a62c4d478ff743d130386e48d771c318e3aea4916e6270
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FatsecretLite
4
- VERSION = "0.1.2"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -30,7 +30,7 @@ module FatsecretLite
30
30
  client = OAuth2::Client.new(
31
31
  configuration.client_id,
32
32
  configuration.client_secret,
33
- site: 'https://oauth.fatsecret.com',
33
+ site: 'https://platform.fatsecret.com/rest/server.api',
34
34
  token_url: 'https://oauth.fatsecret.com/connect/token'
35
35
  )
36
36
 
@@ -41,14 +41,15 @@ module FatsecretLite
41
41
  def get_food_details(food_id)
42
42
  access_token = get_access_token
43
43
 
44
- response = RestClient.get(
44
+ response = RestClient.post(
45
45
  'https://platform.fatsecret.com/rest/server.api',
46
- params: {
46
+ {
47
47
  method: 'food.get.v2',
48
48
  food_id: food_id,
49
49
  format: 'json'
50
50
  },
51
- headers: {
51
+ {
52
+ content_type: :json,
52
53
  Authorization: "Bearer #{access_token}"
53
54
  }
54
55
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fatsecret_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - KapilDevPal