usda_ndb 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +6 -4
- data/lib/usda_ndb/version.rb +1 -1
- data/lib/usda_ndb.rb +1 -0
- data/usda_ndb.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d66e76d9049ebeb3bb131ed96dfc7bdb3e2cc5c
|
|
4
|
+
data.tar.gz: 3dde17aee58a6292c43b8ad61bf9275a3c40ed19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 369c41ff2df060fe89c91f0a3f45fa91e6cf4a6d6bafb09f49322a2fa2c3bd1db5e710aef7dab8fc91aeb1d8c3523ddbd7448a50b7302b420dcf5b7378f4ca21
|
|
7
|
+
data.tar.gz: 0c35577084d0a194d97e7cdca5abc561bafdd9dcb1487bf7c229afd81ff0e15b64d646519bcedce114c0e5f7521057973fa2ebfdbb593e715c8aacdbf3091769
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# UsdaNdb
|
|
2
2
|
|
|
3
|
-
A ruby gem wrapping API of USDA National Nutrient Database
|
|
3
|
+
A ruby gem wrapping API of USDA National Nutrient Database which will let you
|
|
4
|
+
instantly search for nutrition data.
|
|
5
|
+
You may also consider importing the database with usda-nutrient-database gem.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -20,7 +22,7 @@ Or install it yourself as:
|
|
|
20
22
|
|
|
21
23
|
## Usage
|
|
22
24
|
|
|
23
|
-
Visit
|
|
25
|
+
Visit https://api.data.gov/signup/ and get a free data.gov API key. Then create initializer
|
|
24
26
|
|
|
25
27
|
$ rails generate usda_ndb:install
|
|
26
28
|
|
|
@@ -40,8 +42,8 @@ UsdaNdb.reports('01208')
|
|
|
40
42
|
# => {"report"=>{"sr"=>"28", "type"=>"Basic", "food"=>{"ndbno"=>"01208", "name"=>"Cheese, provolone, reduced fat", "nutrients"=>[{"nutrient_id"=>"255", "name"=>"Water", ...
|
|
41
43
|
|
|
42
44
|
# to search for products
|
|
43
|
-
UsdaNdb.search('
|
|
44
|
-
# => {"list"=>{"q"=>"
|
|
45
|
+
UsdaNdb.search('apple raw')
|
|
46
|
+
# => {"list"=>{"q"=>"apple raw", "sr"=>"28", "ds"=>"any", "start"=>0, "end"=>22, "total"=>22, "group"=>"", "sort"=>"r", "item"=>[{"offset"=>0, "group"=>"Fruits and Fruit Juices", "name"=>"Apples, raw, with skin", "ndbno"=>"09003", "ds"=>"SR"}, ...
|
|
45
47
|
|
|
46
48
|
# to list products
|
|
47
49
|
UsdaNdb.list
|
data/lib/usda_ndb/version.rb
CHANGED
data/lib/usda_ndb.rb
CHANGED
data/usda_ndb.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: usda_ndb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- aTeapot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
@@ -94,6 +94,20 @@ dependencies:
|
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: pry
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
97
111
|
description:
|
|
98
112
|
email:
|
|
99
113
|
- latem999@o2.pl
|
|
@@ -139,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
153
|
version: '0'
|
|
140
154
|
requirements: []
|
|
141
155
|
rubyforge_project:
|
|
142
|
-
rubygems_version: 2.
|
|
156
|
+
rubygems_version: 2.6.8
|
|
143
157
|
signing_key:
|
|
144
158
|
specification_version: 4
|
|
145
159
|
summary: Wrapper for USDA National Nutrient Database API
|