Closed teolemon closed 7 years ago
Reference at http://en.wiki.openfoodfacts.org/API
@teolemon in the wiki, this is mention: (remember to do tests on world.openfoodfacts.net - login and password: off )
But the url require a basic authentication. do you know an openfoodfacts server in which i can do my tests please ?
if it's read, do it on prod. if it's write, the api login and pwd for .net are: off
regarding http://en.wiki.openfoodfacts.org/API#WRITE_API_Documentation,
if i do a POST to test the posting of product with the sample URL http://world.openfoodfacts.net/cgi/product_jqm2.pl?code=0048151623426&product_name=Maryland%20Choc%20Chip&quantity=230g&nutriment_energy=450&nutriment_energy_unit=kJ&nutrition_data_per=serving&ingredients_text=Fortified%20wheat%20flour%2C%20Chocolate%20chips%20%2825%25%29%2C%20Sugar%2C%20Palm%20oil%2C%20Golden%20syrup%2C%20Whey%20and%20whey%20derivatives%20%28Milk%29%2C%20Raising%20agents%2C%20Salt%2C%20Flavouring&traces=Milk%2C+Soya%2C+Nuts%2C+Wheat
i had a 401 Authorization Required
response.
off / off
my bad :-( But i have the same result with user_id=off&password=off
Do you know if possible to use this API with a JSON POST body ?
https://github.com/openfoodfacts/openfoodfacts-server/issues/510
Not finished yet
What about we split this into smaller bugs and keep this as a meta-bug. My understanding is that there's a common part to fetch the facet and display it (and possibly the items within) and then facet specific part (if we're dealing with places, additives…) that requires customizing the view (showing a map…)
the api part is ready. i can merge it and you can create other issues to handle the creation of the ux and the binding to api
Closing this bug. It's been merged.