ndb-ruby 0.2.0

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.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +11 -0
  3. data/.gitignore +9 -0
  4. data/.rubocop.yml +1055 -0
  5. data/.travis.yml +4 -0
  6. data/CODE_OF_CONDUCT.md +13 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +80 -0
  10. data/Rakefile +4 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +7 -0
  13. data/lib/ndb-ruby.rb +41 -0
  14. data/lib/ndb/food_report.rb +13 -0
  15. data/lib/ndb/list.rb +21 -0
  16. data/lib/ndb/nutrient_report.rb +21 -0
  17. data/lib/ndb/search.rb +24 -0
  18. data/lib/ndb/version.rb +3 -0
  19. data/ndb-ruby.gemspec +32 -0
  20. data/spec/fixtures/vcr_cassettes/food_report_ndbno.yml +766 -0
  21. data/spec/fixtures/vcr_cassettes/food_report_type.yml +1278 -0
  22. data/spec/fixtures/vcr_cassettes/list_max.yml +574 -0
  23. data/spec/fixtures/vcr_cassettes/list_offset.yml +324 -0
  24. data/spec/fixtures/vcr_cassettes/list_sort.yml +324 -0
  25. data/spec/fixtures/vcr_cassettes/list_type.yml +324 -0
  26. data/spec/fixtures/vcr_cassettes/nutrient_report_food_group.yml +829 -0
  27. data/spec/fixtures/vcr_cassettes/nutrient_report_max.yml +1576 -0
  28. data/spec/fixtures/vcr_cassettes/nutrient_report_ndbno.yml +89 -0
  29. data/spec/fixtures/vcr_cassettes/nutrient_report_nutrients.yml +824 -0
  30. data/spec/fixtures/vcr_cassettes/nutrient_report_offset.yml +824 -0
  31. data/spec/fixtures/vcr_cassettes/nutrient_report_subset.yml +826 -0
  32. data/spec/fixtures/vcr_cassettes/search_all_foods.yml +375 -0
  33. data/spec/fixtures/vcr_cassettes/search_food_group.yml +375 -0
  34. data/spec/fixtures/vcr_cassettes/search_max_rows.yml +675 -0
  35. data/spec/fixtures/vcr_cassettes/search_query.yml +375 -0
  36. data/spec/fixtures/vcr_cassettes/search_sort_name.yml +213 -0
  37. data/spec/ndb/food_report_spec.rb +19 -0
  38. data/spec/ndb/list_spec.rb +33 -0
  39. data/spec/ndb/nutrient_report_spec.rb +49 -0
  40. data/spec/ndb/search_spec.rb +59 -0
  41. data/spec/ndb_spec.rb +13 -0
  42. data/spec/spec_helper.rb +21 -0
  43. metadata +211 -0
@@ -0,0 +1,324 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.nal.usda.gov/ndb/list?api_key=DEMO_KEY&format=JSON&lt=n&max=50&offset=0&sort=n
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json;charset=UTF-8
35
+ Date:
36
+ - Sun, 27 Sep 2015 00:52:08 GMT
37
+ Location:
38
+ - ''
39
+ Server:
40
+ - nginx
41
+ Vary:
42
+ - Accept-Encoding
43
+ Via:
44
+ - 1.1 varnish-v4
45
+ X-Cache:
46
+ - MISS
47
+ X-Ratelimit-Limit:
48
+ - '1000'
49
+ X-Ratelimit-Remaining:
50
+ - '984'
51
+ X-Varnish:
52
+ - '41905933'
53
+ Transfer-Encoding:
54
+ - chunked
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: |-
60
+ {
61
+ "list": {
62
+ "lt": "n",
63
+ "start": 0,
64
+ "end": 50,
65
+ "total": 190,
66
+ "sr": "27",
67
+ "sort": "n",
68
+ "item": [
69
+ {
70
+ "offset": 0,
71
+ "id": "749",
72
+ "name": "(+)-Catechin"
73
+ },
74
+ {
75
+ "offset": 1,
76
+ "id": "794",
77
+ "name": "(+)-Gallocatechin"
78
+ },
79
+ {
80
+ "offset": 2,
81
+ "id": "796",
82
+ "name": "(+)-Gallocatechin 3-gallate"
83
+ },
84
+ {
85
+ "offset": 3,
86
+ "id": "751",
87
+ "name": "(-)-Epicatechin"
88
+ },
89
+ {
90
+ "offset": 4,
91
+ "id": "752",
92
+ "name": "(-)-Epicatechin 3-gallate"
93
+ },
94
+ {
95
+ "offset": 5,
96
+ "id": "750",
97
+ "name": "(-)-Epigallocatechin"
98
+ },
99
+ {
100
+ "offset": 6,
101
+ "id": "753",
102
+ "name": "(-)-Epigallocatechin 3-gallate"
103
+ },
104
+ {
105
+ "offset": 7,
106
+ "id": "610",
107
+ "name": "10:0"
108
+ },
109
+ {
110
+ "offset": 8,
111
+ "id": "611",
112
+ "name": "12:0"
113
+ },
114
+ {
115
+ "offset": 9,
116
+ "id": "696",
117
+ "name": "13:0"
118
+ },
119
+ {
120
+ "offset": 10,
121
+ "id": "612",
122
+ "name": "14:0"
123
+ },
124
+ {
125
+ "offset": 11,
126
+ "id": "625",
127
+ "name": "14:1"
128
+ },
129
+ {
130
+ "offset": 12,
131
+ "id": "652",
132
+ "name": "15:0"
133
+ },
134
+ {
135
+ "offset": 13,
136
+ "id": "697",
137
+ "name": "15:1"
138
+ },
139
+ {
140
+ "offset": 14,
141
+ "id": "613",
142
+ "name": "16:0"
143
+ },
144
+ {
145
+ "offset": 15,
146
+ "id": "673",
147
+ "name": "16:1 c"
148
+ },
149
+ {
150
+ "offset": 16,
151
+ "id": "662",
152
+ "name": "16:1 t"
153
+ },
154
+ {
155
+ "offset": 17,
156
+ "id": "626",
157
+ "name": "16:1 undifferentiated"
158
+ },
159
+ {
160
+ "offset": 18,
161
+ "id": "653",
162
+ "name": "17:0"
163
+ },
164
+ {
165
+ "offset": 19,
166
+ "id": "687",
167
+ "name": "17:1"
168
+ },
169
+ {
170
+ "offset": 20,
171
+ "id": "614",
172
+ "name": "18:0"
173
+ },
174
+ {
175
+ "offset": 21,
176
+ "id": "674",
177
+ "name": "18:1 c"
178
+ },
179
+ {
180
+ "offset": 22,
181
+ "id": "663",
182
+ "name": "18:1 t"
183
+ },
184
+ {
185
+ "offset": 23,
186
+ "id": "617",
187
+ "name": "18:1 undifferentiated"
188
+ },
189
+ {
190
+ "offset": 24,
191
+ "id": "859",
192
+ "name": "18:1-11 t (18:1t n-7)"
193
+ },
194
+ {
195
+ "offset": 25,
196
+ "id": "670",
197
+ "name": "18:2 CLAs"
198
+ },
199
+ {
200
+ "offset": 26,
201
+ "id": "666",
202
+ "name": "18:2 i"
203
+ },
204
+ {
205
+ "offset": 27,
206
+ "id": "675",
207
+ "name": "18:2 n-6 c,c"
208
+ },
209
+ {
210
+ "offset": 28,
211
+ "id": "665",
212
+ "name": "18:2 t not further defined"
213
+ },
214
+ {
215
+ "offset": 29,
216
+ "id": "669",
217
+ "name": "18:2 t,t"
218
+ },
219
+ {
220
+ "offset": 30,
221
+ "id": "618",
222
+ "name": "18:2 undifferentiated"
223
+ },
224
+ {
225
+ "offset": 31,
226
+ "id": "851",
227
+ "name": "18:3 n-3 c,c,c (ALA)"
228
+ },
229
+ {
230
+ "offset": 32,
231
+ "id": "685",
232
+ "name": "18:3 n-6 c,c,c"
233
+ },
234
+ {
235
+ "offset": 33,
236
+ "id": "619",
237
+ "name": "18:3 undifferentiated"
238
+ },
239
+ {
240
+ "offset": 34,
241
+ "id": "856",
242
+ "name": "18:3i"
243
+ },
244
+ {
245
+ "offset": 35,
246
+ "id": "627",
247
+ "name": "18:4"
248
+ },
249
+ {
250
+ "offset": 36,
251
+ "id": "615",
252
+ "name": "20:0"
253
+ },
254
+ {
255
+ "offset": 37,
256
+ "id": "628",
257
+ "name": "20:1"
258
+ },
259
+ {
260
+ "offset": 38,
261
+ "id": "672",
262
+ "name": "20:2 n-6 c,c"
263
+ },
264
+ {
265
+ "offset": 39,
266
+ "id": "852",
267
+ "name": "20:3 n-3"
268
+ },
269
+ {
270
+ "offset": 40,
271
+ "id": "853",
272
+ "name": "20:3 n-6"
273
+ },
274
+ {
275
+ "offset": 41,
276
+ "id": "689",
277
+ "name": "20:3 undifferentiated"
278
+ },
279
+ {
280
+ "offset": 42,
281
+ "id": "855",
282
+ "name": "20:4 n-6"
283
+ },
284
+ {
285
+ "offset": 43,
286
+ "id": "620",
287
+ "name": "20:4 undifferentiated"
288
+ },
289
+ {
290
+ "offset": 44,
291
+ "id": "629",
292
+ "name": "20:5 n-3 (EPA)"
293
+ },
294
+ {
295
+ "offset": 45,
296
+ "id": "857",
297
+ "name": "21:5"
298
+ },
299
+ {
300
+ "offset": 46,
301
+ "id": "624",
302
+ "name": "22:0"
303
+ },
304
+ {
305
+ "offset": 47,
306
+ "id": "676",
307
+ "name": "22:1 c"
308
+ },
309
+ {
310
+ "offset": 48,
311
+ "id": "664",
312
+ "name": "22:1 t"
313
+ },
314
+ {
315
+ "offset": 49,
316
+ "id": "630",
317
+ "name": "22:1 undifferentiated"
318
+ }
319
+ ]
320
+ }
321
+ }
322
+ http_version:
323
+ recorded_at: Sun, 27 Sep 2015 00:52:08 GMT
324
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,829 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.nal.usda.gov/ndb/nutrients?api_key=DEMO_KEY&fg=0100&format=JSON&fq=&max=50&nutrients=205&offset=0&sort=f&subset=0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json;charset=UTF-8
35
+ Date:
36
+ - Sun, 27 Sep 2015 01:05:12 GMT
37
+ Location:
38
+ - ''
39
+ Server:
40
+ - nginx
41
+ Vary:
42
+ - Accept-Encoding
43
+ Via:
44
+ - 1.1 varnish-v4
45
+ X-Cache:
46
+ - MISS
47
+ X-Ratelimit-Limit:
48
+ - '1000'
49
+ X-Ratelimit-Remaining:
50
+ - '971'
51
+ X-Varnish:
52
+ - '21984051'
53
+ Transfer-Encoding:
54
+ - chunked
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: |-
60
+ {
61
+ "report": {
62
+ "sr": "27",
63
+ "groups": [
64
+ {
65
+ "id": "0100",
66
+ "description": "Dairy and Egg Products"
67
+ }
68
+ ],
69
+ "subset": "All foods",
70
+ "end": 50,
71
+ "start": 0,
72
+ "total": 264,
73
+ "foods": [
74
+ {
75
+ "ndbno": "43205",
76
+ "name": "Beverage, instant breakfast powder, chocolate, not reconstituted",
77
+ "weight": 7.4,
78
+ "measure": "1.0 tbsp",
79
+ "nutrients": [
80
+ {
81
+ "nutrient_id": "205",
82
+ "nutrient": "Carbohydrate, by difference",
83
+ "unit": "g",
84
+ "value": "4.90",
85
+ "gm": 66.2
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "ndbno": "43260",
91
+ "name": "Beverage, instant breakfast powder, chocolate, sugar-free, not reconstituted",
92
+ "weight": 5.6,
93
+ "measure": "1.0 tbsp",
94
+ "nutrients": [
95
+ {
96
+ "nutrient_id": "205",
97
+ "nutrient": "Carbohydrate, by difference",
98
+ "unit": "g",
99
+ "value": "2.30",
100
+ "gm": 41.0
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "ndbno": "43078",
106
+ "name": "Beverage, milkshake mix, dry, not chocolate",
107
+ "weight": 7.0,
108
+ "measure": "1.0 tbsp",
109
+ "nutrients": [
110
+ {
111
+ "nutrient_id": "205",
112
+ "nutrient": "Carbohydrate, by difference",
113
+ "unit": "g",
114
+ "value": "3.70",
115
+ "gm": 52.9
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "ndbno": "01003",
121
+ "name": "Butter oil, anhydrous",
122
+ "weight": 12.8,
123
+ "measure": "1.0 tbsp",
124
+ "nutrients": [
125
+ {
126
+ "nutrient_id": "205",
127
+ "nutrient": "Carbohydrate, by difference",
128
+ "unit": "g",
129
+ "value": "0.00",
130
+ "gm": 0.0
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "ndbno": "01001",
136
+ "name": "Butter, salted",
137
+ "weight": 5.0,
138
+ "measure": "1.0 pat (1\" sq, 1/3\" high)",
139
+ "nutrients": [
140
+ {
141
+ "nutrient_id": "205",
142
+ "nutrient": "Carbohydrate, by difference",
143
+ "unit": "g",
144
+ "value": "0.00",
145
+ "gm": 0.06
146
+ }
147
+ ]
148
+ },
149
+ {
150
+ "ndbno": "01002",
151
+ "name": "Butter, whipped, with salt",
152
+ "weight": 3.8,
153
+ "measure": "1.0 pat (1\" sq, 1/3\" high)",
154
+ "nutrients": [
155
+ {
156
+ "nutrient_id": "205",
157
+ "nutrient": "Carbohydrate, by difference",
158
+ "unit": "g",
159
+ "value": "0.00",
160
+ "gm": 0.06
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "ndbno": "01145",
166
+ "name": "Butter, without salt",
167
+ "weight": 5.0,
168
+ "measure": "1.0 pat (1\" sq, 1/3\" high)",
169
+ "nutrients": [
170
+ {
171
+ "nutrient_id": "205",
172
+ "nutrient": "Carbohydrate, by difference",
173
+ "unit": "g",
174
+ "value": "0.00",
175
+ "gm": 0.06
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "ndbno": "01045",
181
+ "name": "Cheese food, cold pack, American",
182
+ "weight": 28.35,
183
+ "measure": "1.0 oz",
184
+ "nutrients": [
185
+ {
186
+ "nutrient_id": "205",
187
+ "nutrient": "Carbohydrate, by difference",
188
+ "unit": "g",
189
+ "value": "2.36",
190
+ "gm": 8.32
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "ndbno": "44048",
196
+ "name": "Cheese food, pasteurized process, American, imitation, without added vitamin D",
197
+ "weight": 28.35,
198
+ "measure": "1.0 oz",
199
+ "nutrients": [
200
+ {
201
+ "nutrient_id": "205",
202
+ "nutrient": "Carbohydrate, by difference",
203
+ "unit": "g",
204
+ "value": "4.59",
205
+ "gm": 16.18
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "ndbno": "01046",
211
+ "name": "Cheese food, pasteurized process, American, vitamin D fortified",
212
+ "weight": 113.0,
213
+ "measure": "1.0 cup",
214
+ "nutrients": [
215
+ {
216
+ "nutrient_id": "205",
217
+ "nutrient": "Carbohydrate, by difference",
218
+ "unit": "g",
219
+ "value": "9.67",
220
+ "gm": 8.56
221
+ }
222
+ ]
223
+ },
224
+ {
225
+ "ndbno": "01254",
226
+ "name": "Cheese food, pasteurized process, American, without added vitamin D",
227
+ "weight": 113.0,
228
+ "measure": "1.0 cup",
229
+ "nutrients": [
230
+ {
231
+ "nutrient_id": "205",
232
+ "nutrient": "Carbohydrate, by difference",
233
+ "unit": "g",
234
+ "value": "9.67",
235
+ "gm": 8.56
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ "ndbno": "01047",
241
+ "name": "Cheese food, pasteurized process, swiss",
242
+ "weight": 28.35,
243
+ "measure": "1.0 oz",
244
+ "nutrients": [
245
+ {
246
+ "nutrient_id": "205",
247
+ "nutrient": "Carbohydrate, by difference",
248
+ "unit": "g",
249
+ "value": "1.28",
250
+ "gm": 4.5
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "ndbno": "01215",
256
+ "name": "Cheese product, pasteurized process, American, reduced fat, fortified with vitamin D",
257
+ "weight": 21.0,
258
+ "measure": "1.0 slice 3/4 oz",
259
+ "nutrients": [
260
+ {
261
+ "nutrient_id": "205",
262
+ "nutrient": "Carbohydrate, by difference",
263
+ "unit": "g",
264
+ "value": "2.23",
265
+ "gm": 10.6
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "ndbno": "42258",
271
+ "name": "Cheese product, pasteurized process, cheddar, reduced fat",
272
+ "weight": 28.0,
273
+ "measure": "1.0 slice 1 oz",
274
+ "nutrients": [
275
+ {
276
+ "nutrient_id": "205",
277
+ "nutrient": "Carbohydrate, by difference",
278
+ "unit": "g",
279
+ "value": "2.97",
280
+ "gm": 10.6
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ "ndbno": "01164",
286
+ "name": "Cheese sauce, prepared from recipe",
287
+ "weight": 30.0,
288
+ "measure": "2.0 tbsp",
289
+ "nutrients": [
290
+ {
291
+ "nutrient_id": "205",
292
+ "nutrient": "Carbohydrate, by difference",
293
+ "unit": "g",
294
+ "value": "1.64",
295
+ "gm": 5.48
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "ndbno": "01259",
301
+ "name": "Cheese spread, American or Cheddar cheese base, reduced fat",
302
+ "weight": 21.0,
303
+ "measure": "1.0 piece",
304
+ "nutrients": [
305
+ {
306
+ "nutrient_id": "205",
307
+ "nutrient": "Carbohydrate, by difference",
308
+ "unit": "g",
309
+ "value": "2.25",
310
+ "gm": 10.71
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "ndbno": "43276",
316
+ "name": "Cheese spread, cream cheese base",
317
+ "weight": 28.35,
318
+ "measure": "1.0 oz",
319
+ "nutrients": [
320
+ {
321
+ "nutrient_id": "205",
322
+ "nutrient": "Carbohydrate, by difference",
323
+ "unit": "g",
324
+ "value": "0.99",
325
+ "gm": 3.5
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "ndbno": "01048",
331
+ "name": "Cheese spread, pasteurized process, American",
332
+ "weight": 140.0,
333
+ "measure": "1.0 cup, diced",
334
+ "nutrients": [
335
+ {
336
+ "nutrient_id": "205",
337
+ "nutrient": "Carbohydrate, by difference",
338
+ "unit": "g",
339
+ "value": "12.22",
340
+ "gm": 8.73
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "ndbno": "01161",
346
+ "name": "Cheese substitute, mozzarella",
347
+ "weight": 113.0,
348
+ "measure": "1.0 cup, shredded",
349
+ "nutrients": [
350
+ {
351
+ "nutrient_id": "205",
352
+ "nutrient": "Carbohydrate, by difference",
353
+ "unit": "g",
354
+ "value": "26.75",
355
+ "gm": 23.67
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "ndbno": "43278",
361
+ "name": "Cheese, american cheddar, imitation",
362
+ "weight": 21.0,
363
+ "measure": "1.0 slice",
364
+ "nutrients": [
365
+ {
366
+ "nutrient_id": "205",
367
+ "nutrient": "Carbohydrate, by difference",
368
+ "unit": "g",
369
+ "value": "2.44",
370
+ "gm": 11.6
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "ndbno": "01061",
376
+ "name": "Cheese, American, nonfat or fat free",
377
+ "weight": 19.0,
378
+ "measure": "1.0 serving",
379
+ "nutrients": [
380
+ {
381
+ "nutrient_id": "205",
382
+ "nutrient": "Carbohydrate, by difference",
383
+ "unit": "g",
384
+ "value": "2.00",
385
+ "gm": 10.53
386
+ }
387
+ ]
388
+ },
389
+ {
390
+ "ndbno": "01004",
391
+ "name": "Cheese, blue",
392
+ "weight": 28.35,
393
+ "measure": "1.0 oz",
394
+ "nutrients": [
395
+ {
396
+ "nutrient_id": "205",
397
+ "nutrient": "Carbohydrate, by difference",
398
+ "unit": "g",
399
+ "value": "0.66",
400
+ "gm": 2.34
401
+ }
402
+ ]
403
+ },
404
+ {
405
+ "ndbno": "01005",
406
+ "name": "Cheese, brick",
407
+ "weight": 132.0,
408
+ "measure": "1.0 cup, diced",
409
+ "nutrients": [
410
+ {
411
+ "nutrient_id": "205",
412
+ "nutrient": "Carbohydrate, by difference",
413
+ "unit": "g",
414
+ "value": "3.68",
415
+ "gm": 2.79
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "ndbno": "01006",
421
+ "name": "Cheese, brie",
422
+ "weight": 28.35,
423
+ "measure": "1.0 oz",
424
+ "nutrients": [
425
+ {
426
+ "nutrient_id": "205",
427
+ "nutrient": "Carbohydrate, by difference",
428
+ "unit": "g",
429
+ "value": "0.13",
430
+ "gm": 0.45
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "ndbno": "01007",
436
+ "name": "Cheese, camembert",
437
+ "weight": 28.35,
438
+ "measure": "1.0 oz",
439
+ "nutrients": [
440
+ {
441
+ "nutrient_id": "205",
442
+ "nutrient": "Carbohydrate, by difference",
443
+ "unit": "g",
444
+ "value": "0.13",
445
+ "gm": 0.46
446
+ }
447
+ ]
448
+ },
449
+ {
450
+ "ndbno": "01008",
451
+ "name": "Cheese, caraway",
452
+ "weight": 28.35,
453
+ "measure": "1.0 oz",
454
+ "nutrients": [
455
+ {
456
+ "nutrient_id": "205",
457
+ "nutrient": "Carbohydrate, by difference",
458
+ "unit": "g",
459
+ "value": "0.87",
460
+ "gm": 3.06
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "ndbno": "01009",
466
+ "name": "Cheese, cheddar",
467
+ "weight": 132.0,
468
+ "measure": "1.0 cup, diced",
469
+ "nutrients": [
470
+ {
471
+ "nutrient_id": "205",
472
+ "nutrient": "Carbohydrate, by difference",
473
+ "unit": "g",
474
+ "value": "1.76",
475
+ "gm": 1.33
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ "ndbno": "01265",
481
+ "name": "Cheese, cheddar, nonfat or fat free",
482
+ "weight": 28.0,
483
+ "measure": "1.0 serving",
484
+ "nutrients": [
485
+ {
486
+ "nutrient_id": "205",
487
+ "nutrient": "Carbohydrate, by difference",
488
+ "unit": "g",
489
+ "value": "2.00",
490
+ "gm": 7.14
491
+ }
492
+ ]
493
+ },
494
+ {
495
+ "ndbno": "01260",
496
+ "name": "Cheese, cheddar, reduced fat",
497
+ "weight": 21.0,
498
+ "measure": "1.0 slice",
499
+ "nutrients": [
500
+ {
501
+ "nutrient_id": "205",
502
+ "nutrient": "Carbohydrate, by difference",
503
+ "unit": "g",
504
+ "value": "0.85",
505
+ "gm": 4.06
506
+ }
507
+ ]
508
+ },
509
+ {
510
+ "ndbno": "01270",
511
+ "name": "Cheese, cheddar, sharp, sliced",
512
+ "weight": 19.0,
513
+ "measure": "1.0 slice 2/3 oz. slice",
514
+ "nutrients": [
515
+ {
516
+ "nutrient_id": "205",
517
+ "nutrient": "Carbohydrate, by difference",
518
+ "unit": "g",
519
+ "value": "0.40",
520
+ "gm": 2.13
521
+ }
522
+ ]
523
+ },
524
+ {
525
+ "ndbno": "01010",
526
+ "name": "Cheese, cheshire",
527
+ "weight": 28.35,
528
+ "measure": "1.0 oz",
529
+ "nutrients": [
530
+ {
531
+ "nutrient_id": "205",
532
+ "nutrient": "Carbohydrate, by difference",
533
+ "unit": "g",
534
+ "value": "1.36",
535
+ "gm": 4.78
536
+ }
537
+ ]
538
+ },
539
+ {
540
+ "ndbno": "01011",
541
+ "name": "Cheese, colby",
542
+ "weight": 132.0,
543
+ "measure": "1.0 cup, diced",
544
+ "nutrients": [
545
+ {
546
+ "nutrient_id": "205",
547
+ "nutrient": "Carbohydrate, by difference",
548
+ "unit": "g",
549
+ "value": "3.39",
550
+ "gm": 2.57
551
+ }
552
+ ]
553
+ },
554
+ {
555
+ "ndbno": "01012",
556
+ "name": "Cheese, cottage, creamed, large or small curd",
557
+ "weight": 113.0,
558
+ "measure": "4.0 oz",
559
+ "nutrients": [
560
+ {
561
+ "nutrient_id": "205",
562
+ "nutrient": "Carbohydrate, by difference",
563
+ "unit": "g",
564
+ "value": "3.82",
565
+ "gm": 3.38
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ "ndbno": "01013",
571
+ "name": "Cheese, cottage, creamed, with fruit",
572
+ "weight": 113.0,
573
+ "measure": "4.0 oz",
574
+ "nutrients": [
575
+ {
576
+ "nutrient_id": "205",
577
+ "nutrient": "Carbohydrate, by difference",
578
+ "unit": "g",
579
+ "value": "5.21",
580
+ "gm": 4.61
581
+ }
582
+ ]
583
+ },
584
+ {
585
+ "ndbno": "01016",
586
+ "name": "Cheese, cottage, lowfat, 1% milkfat",
587
+ "weight": 113.0,
588
+ "measure": "4.0 oz",
589
+ "nutrients": [
590
+ {
591
+ "nutrient_id": "205",
592
+ "nutrient": "Carbohydrate, by difference",
593
+ "unit": "g",
594
+ "value": "3.07",
595
+ "gm": 2.72
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ "ndbno": "42235",
601
+ "name": "Cheese, cottage, lowfat, 1% milkfat, lactose reduced",
602
+ "weight": 113.0,
603
+ "measure": "4.0 oz",
604
+ "nutrients": [
605
+ {
606
+ "nutrient_id": "205",
607
+ "nutrient": "Carbohydrate, by difference",
608
+ "unit": "g",
609
+ "value": "3.62",
610
+ "gm": 3.2
611
+ }
612
+ ]
613
+ },
614
+ {
615
+ "ndbno": "43352",
616
+ "name": "Cheese, cottage, lowfat, 1% milkfat, no sodium added",
617
+ "weight": 113.0,
618
+ "measure": "4.0 oz",
619
+ "nutrients": [
620
+ {
621
+ "nutrient_id": "205",
622
+ "nutrient": "Carbohydrate, by difference",
623
+ "unit": "g",
624
+ "value": "3.05",
625
+ "gm": 2.7
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ "ndbno": "43396",
631
+ "name": "Cheese, cottage, lowfat, 1% milkfat, with vegetables",
632
+ "weight": 113.0,
633
+ "measure": "4.0 oz",
634
+ "nutrients": [
635
+ {
636
+ "nutrient_id": "205",
637
+ "nutrient": "Carbohydrate, by difference",
638
+ "unit": "g",
639
+ "value": "3.39",
640
+ "gm": 3.0
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ "ndbno": "01015",
646
+ "name": "Cheese, cottage, lowfat, 2% milkfat",
647
+ "weight": 113.0,
648
+ "measure": "4.0 oz",
649
+ "nutrients": [
650
+ {
651
+ "nutrient_id": "205",
652
+ "nutrient": "Carbohydrate, by difference",
653
+ "unit": "g",
654
+ "value": "5.38",
655
+ "gm": 4.76
656
+ }
657
+ ]
658
+ },
659
+ {
660
+ "ndbno": "01014",
661
+ "name": "Cheese, cottage, nonfat, uncreamed, dry, large or small curd",
662
+ "weight": 145.0,
663
+ "measure": "1.0 cup (not packed)",
664
+ "nutrients": [
665
+ {
666
+ "nutrient_id": "205",
667
+ "nutrient": "Carbohydrate, by difference",
668
+ "unit": "g",
669
+ "value": "9.66",
670
+ "gm": 6.66
671
+ }
672
+ ]
673
+ },
674
+ {
675
+ "ndbno": "43273",
676
+ "name": "Cheese, cottage, with vegetables",
677
+ "weight": 113.0,
678
+ "measure": "4.0 oz",
679
+ "nutrients": [
680
+ {
681
+ "nutrient_id": "205",
682
+ "nutrient": "Carbohydrate, by difference",
683
+ "unit": "g",
684
+ "value": "3.39",
685
+ "gm": 3.0
686
+ }
687
+ ]
688
+ },
689
+ {
690
+ "ndbno": "01017",
691
+ "name": "Cheese, cream",
692
+ "weight": 14.5,
693
+ "measure": "1.0 tbsp",
694
+ "nutrients": [
695
+ {
696
+ "nutrient_id": "205",
697
+ "nutrient": "Carbohydrate, by difference",
698
+ "unit": "g",
699
+ "value": "0.59",
700
+ "gm": 4.07
701
+ }
702
+ ]
703
+ },
704
+ {
705
+ "ndbno": "01186",
706
+ "name": "Cheese, cream, fat free",
707
+ "weight": 18.0,
708
+ "measure": "1.0 tbsp",
709
+ "nutrients": [
710
+ {
711
+ "nutrient_id": "205",
712
+ "nutrient": "Carbohydrate, by difference",
713
+ "unit": "g",
714
+ "value": "1.38",
715
+ "gm": 7.66
716
+ }
717
+ ]
718
+ },
719
+ {
720
+ "ndbno": "43274",
721
+ "name": "Cheese, cream, low fat",
722
+ "weight": 15.0,
723
+ "measure": "1.0 tbsp",
724
+ "nutrients": [
725
+ {
726
+ "nutrient_id": "205",
727
+ "nutrient": "Carbohydrate, by difference",
728
+ "unit": "g",
729
+ "value": "1.22",
730
+ "gm": 8.13
731
+ }
732
+ ]
733
+ },
734
+ {
735
+ "ndbno": "01227",
736
+ "name": "Cheese, dry white, queso seco",
737
+ "weight": 97.0,
738
+ "measure": "1.0 cup grated",
739
+ "nutrients": [
740
+ {
741
+ "nutrient_id": "205",
742
+ "nutrient": "Carbohydrate, by difference",
743
+ "unit": "g",
744
+ "value": "1.98",
745
+ "gm": 2.04
746
+ }
747
+ ]
748
+ },
749
+ {
750
+ "ndbno": "01018",
751
+ "name": "Cheese, edam",
752
+ "weight": 28.35,
753
+ "measure": "1.0 oz",
754
+ "nutrients": [
755
+ {
756
+ "nutrient_id": "205",
757
+ "nutrient": "Carbohydrate, by difference",
758
+ "unit": "g",
759
+ "value": "0.41",
760
+ "gm": 1.43
761
+ }
762
+ ]
763
+ },
764
+ {
765
+ "ndbno": "01019",
766
+ "name": "Cheese, feta",
767
+ "weight": 150.0,
768
+ "measure": "1.0 cup, crumbled",
769
+ "nutrients": [
770
+ {
771
+ "nutrient_id": "205",
772
+ "nutrient": "Carbohydrate, by difference",
773
+ "unit": "g",
774
+ "value": "6.14",
775
+ "gm": 4.09
776
+ }
777
+ ]
778
+ },
779
+ {
780
+ "ndbno": "01020",
781
+ "name": "Cheese, fontina",
782
+ "weight": 132.0,
783
+ "measure": "1.0 cup, diced",
784
+ "nutrients": [
785
+ {
786
+ "nutrient_id": "205",
787
+ "nutrient": "Carbohydrate, by difference",
788
+ "unit": "g",
789
+ "value": "2.05",
790
+ "gm": 1.55
791
+ }
792
+ ]
793
+ },
794
+ {
795
+ "ndbno": "01228",
796
+ "name": "Cheese, fresh, queso fresco",
797
+ "weight": 122.0,
798
+ "measure": "1.0 cup crumbled",
799
+ "nutrients": [
800
+ {
801
+ "nutrient_id": "205",
802
+ "nutrient": "Carbohydrate, by difference",
803
+ "unit": "g",
804
+ "value": "3.64",
805
+ "gm": 2.98
806
+ }
807
+ ]
808
+ },
809
+ {
810
+ "ndbno": "01021",
811
+ "name": "Cheese, gjetost",
812
+ "weight": 28.35,
813
+ "measure": "1.0 oz",
814
+ "nutrients": [
815
+ {
816
+ "nutrient_id": "205",
817
+ "nutrient": "Carbohydrate, by difference",
818
+ "unit": "g",
819
+ "value": "12.09",
820
+ "gm": 42.65
821
+ }
822
+ ]
823
+ }
824
+ ]
825
+ }
826
+ }
827
+ http_version:
828
+ recorded_at: Sun, 27 Sep 2015 01:05:12 GMT
829
+ recorded_with: VCR 2.9.3