Download .zip |
Info | Example | View files (7) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2015-10-01 (4 years ago) | Not yet rated by the users | Total: 231 | All time: 7,926 This week: 284 |
Version | License | PHP version | Categories | |||
ndbwrap 0.1 | GNU General Publi... | 5 | PHP 5, Web services, Biology |
Class: ndbwrap Version: 0.1 beta 10/1/2015 Copyright 2015 Wagon Trader, All Rights Reserved Description: This class will retrieve nutritional information for food from the USDA Nutritional Database. Files: ndbwrap.class.php - Main class example.food.php - example to request and display food information example.list.php - example to request and display data lists example.nutrient.php - example to request and display specific nutritional information for foods example.search.php - example to search and display foods that match keywords query Installation: Upload files to a web accessible location on your server (eg. public_html) Configuration: For testing, you can use the supplied API key 'DEMO_KEY'. If you are going to use this class in production you will need to get you own API key available at http://ndb.nal.usda.gov/ndb/api/doc (select sign up now in Gaining Access section) You can change the following settings in the class to meet your specific needs... $datagovKey - Your data.gov API key. $ndbFormat - format of request results. Currently only JSON is supported so you should not change this value $USDAcitation - Recommended citation from the USDA. The USDA data is in the public domain, so there are no restrictions for using it, however this citation is the official text for the source. $dbDomain - URL to REST API. You should only need to change this if the USDA changes their API location. Usage: Refer to example files for usage examples. Refer to ndbwrap.class.php file for instructions on using methods Changelog 0.1 beta release |
Files |
File | Role | Description |
---|---|---|
example.food.php | Example | Example Usage |
example.list.php | Example | Example Usage |
example.nutrient.php | Example | Example Usage |
example.search.php | Example | Example Usage |
license.txt | Lic. | License |
manual.txt | Doc. | Documentation |
ndbwrap.class.php | Class | Main Class |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.