openfoodfacts / openfoodfacts-nodejs Goto Github PK
View Code? Open in Web Editor NEWOfficial Node package for Open Food Facts
Home Page: https://openfoodfacts.github.io/openfoodfacts-nodejs/
License: Apache License 2.0
Official Node package for Open Food Facts
Home Page: https://openfoodfacts.github.io/openfoodfacts-nodejs/
License: Apache License 2.0
Migrating to TypeScript, I had to delete tests as they were not working anymore. We should reintroduce them.
Create method getProductsByLanguages(languages)
.
Where languages
is an array.
It must work for the following endpoints:
Having this module on NPM would be great ๐ฆ๐
The function for getting products with barcode is failing
Hello, i just checked your lovely project and i discovered you have some sections missing out like FAQ, about us, contact us and privacy policy. If you dont mind i will like to write that for you.
My email: [email protected]
URL is modified on country
call and then can't be reset properly, find a solution to change that.
Idea of solution: OFF should probably be immutable.
Create method getProductsByLanguageCount(count)
.
Where count
is a number.
It must work for the following endpoints:
The npm package corresponding to this repo is not up to date to the latest development.
See here for more info.
pnpm add openfoodfacts-nodejs
in your terminal (or npm i ...
node_modules
folderopenfoodfacts-nodejs
package folderrequire
but no IntelliSense.To have the latest code of this repo in the package.
Create method getProductsByBarcodeBeginning(barcodeBeginning)
Where barcodeBeginning is a String
. (It must automatically add xxxx[...]
)
example:
await OFF.getProductsByBarcodeBeginning('3596710')
// should fetch https://world.openfoodfacts.org/code/3596710xxxxxx.json
It must work for the following endpoint:
Problem: Tests are randomly failing because of POST/PUT/DELETE requests and the running time is really long.
Solution: Check the resolved URL instead of making HTTP requests.
Create method getLanguages()
.
It must work for the following endpoint:
Create method getBrand(brandName)
.
It must work for the following endpoint:
Create method getLabels()
It must work for the following endpoint:
The test suite is named 'country' which seems random. I assume something like 'OFF Test' or 'API Test' would be more appropriate.
Create method getProductsByLabel(label)
.
It must work for the following endpoint:
Tracking issue for:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.