1.1.8 • Published 7 years ago

nutrient-database v1.1.8

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

#About

Node.js | USDA Nutrient Database wrapper

Our functions provides access to the USDA Food Composition Databases. It is intended primarily to assist application developers wishing to incorporate nutrient data into their applications or websites.

This is a Node.js API wrapper for the USDA Nutrient Database REST API.

For brief documentation please visit -- USDA Food Composition Databases

Installation

Install via NPM

npm install nutrient-database --save

Example

i. FoodReport

var ndb = require('nutrient-database');

// Parameters:
// 1. ndb no
// 2. API Key
ndb.foodReport('01009','DEMO_KEY', function(err, response){
    console.log(JSON.stringify(response));
});

ii. List

var ndb = require('nutrient-database');

// Parameters:
// 1. List Type
// 2. Maximum number
// 3. Offset
// 4. API Key
ndb.list('f','','','DEMO_KEY', function(err, response){
    console.log(JSON.stringify(response));
});

iii. Search

var ndb = require('nutrient-database');

// Parameters:
// 1. Search Query
// 2. Dataset
// 3. Maximum number
// 4. Offset
// 5. API Key
ndb.search('cheese','','','','DEMO_KEY', function(err, response){
    console.log(JSON.stringify(response));
});

Any issue or want more features? Contact me!

This module has been tested under limited scenarios. If you find any issue please feel free to report via one of the below platforms:

Github: nutrient-database | Email: harshdoshi999@gmail.com | Skype: harshxxx3

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago