usda_fdc 0.1.0 → 0.1.1

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: efffc201f528c1a723bc29b4442da66156487f4b208870a026bd1fad23491899
4
- data.tar.gz: 2c75291bcd2c6d121aa741c14d8485228fb52e9cf4654f216f3442f1e6717bea
3
+ metadata.gz: 4796ad6e9de7996f19018c9e89c90386b74313d6ea5661877060aa1a71d4db8b
4
+ data.tar.gz: cbebe212275b3834bf07731efca382a5e9a67b21e7878905f1ff787d125d3aa1
5
5
  SHA512:
6
- metadata.gz: b10bd1373720d91eb06477ee47abb8b179c8b0c73818f8ba12e5af21c84599d7e8cb1ef85aa67929f6093834e11b34b1c62332180a09b83e42d0d590af1c2db8
7
- data.tar.gz: 942c1728a46b7f4a6f8cbc745623f223811bd5a2f81febbd1bfa3c693e5091e17ec9d8433be88c22df7d08b0e0d796ef2b7f2840a183df2d6d4d0d045a34cb4a
6
+ metadata.gz: d14e949edd29832fc9a02d5ed4884b0b9c11e3b8ede97a9eb8ea1f27fe3b0f141cfb1e5a504f1256a828c472415f9cd9dbaa773ba302e6237897d45493d76d12
7
+ data.tar.gz: 5993a9ef8cdb28c88ec35390970880c08416e897ec93ae955d019381f1aa02ffc679690754c2ae28ca5d05938cc4d98aaacda51b864a0d4e2391b6296ee8d677
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.1] - 2022-06-24
4
+
5
+ - Ensure `json` module is available to Client
6
+
3
7
  ## [0.1.0] - 2022-06-24
4
8
 
5
9
  - Add basic support for interacting with USDA FDC endpoints
data/README.md CHANGED
@@ -4,23 +4,30 @@ A Ruby interface to the USDA [FoodData Central](https://fdc.nal.usda.gov) API.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ To install the latest release:
8
+
9
+ $ gem install usda_fdc
10
+
11
+ To include in a Rails project, add it to the Gemfile:
8
12
 
9
13
  ```ruby
10
14
  gem 'usda_fdc'
11
15
  ```
12
16
 
13
- And then execute:
17
+ ## Usage
14
18
 
15
- $ bundle install
19
+ An API key is required to access the service. You can find details on how to obtain a key [here](https://fdc.nal.usda.gov/api-guide.html#bkmk-3).
16
20
 
17
- Or install it yourself as:
21
+ Once you have an API key, you're able to make API calls via the client object:
18
22
 
19
- $ gem install usda_fdc
23
+ ```ruby
24
+ client = UsdaFdc::Client.new('your_api_key')
25
+ client.food(534358)
20
26
 
21
- ## Usage
27
+ #=> { "dataType" => "Branded", "description" => "NUT 'N BERRY MIX", "fdcId" => 534358, ... }
28
+ ```
22
29
 
23
- TBD
30
+ For more information on interacting with the API, including accepted parameters and response formats, check out the official USDA FDC [API guide](https://fdc.nal.usda.gov/api-guide.html).
24
31
 
25
32
  ## Development
26
33
 
@@ -28,10 +35,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
28
35
 
29
36
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
37
 
31
- ## Contributing
32
-
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/usda_fdc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/usda_fdc/blob/master/CODE_OF_CONDUCT.md).
34
-
35
38
  ## License
36
39
 
37
40
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'net/http'
4
+ require 'json'
4
5
 
5
6
  module UsdaFdc
6
7
  class Client
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UsdaFdc
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usda_fdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran Pesic