openfoodfacts / openfoodfacts-androidapp

(Legacy) Native version of Open Food Facts on Android - Coders & Decoders welcome 🤳🥫
https://android.openfoodfacts.org
Apache License 2.0
767 stars 446 forks source link

Create list of products by: labels, categories, brands, additives… #66

Closed teolemon closed 7 years ago

teolemon commented 8 years ago

5.6.3 Labels 5.6.3.1 List of labels 5.6.3.2 Individual label 5.6.4 Categories 5.6.4.1 List of categories 5.6.4.2 Individual category 5.6.5 Status of products 5.6.5.1 List of States 5.6.5.2 Individual Status 5.6.6 Packaging 5.6.6.1 List of Packagings 5.6.6.2 Individual Packaging 5.6.7 Brands 5.6.7.1 List of Brands 5.6.7.2 Individual Brand 5.6.8 Purchase Place of products 5.6.8.1 List of Purchase Place 5.6.8.2 Individual Purchase Place 5.6.9 Store of products 5.6.9.1 List of Stores 5.6.9.2 Individual Store 5.6.10 Country of products 5.6.10.1 List of Countries 5.6.10.2 Individual Country 5.6.11 Trace of products 5.6.11.1 List of Traces 5.6.11.2 Individual Trace 5.6.12 Additive of products 5.6.12.1 List of Additives 5.6.12.2 Individual Additive 5.6.13 allergens of products 5.6.13.1 List of allergens 5.6.13.2 Individual allergen 5.6.14 Barcodes 5.6.14.1 List of List of barcodes beginning with a given number 5.6.14.2 List of barcodes beginning with 3596710 5.6.15 Entry dates 5.6.15.1 List of entry dates 5.6.15.2 List of products with a given entry date 5.6.16 Packager codes 5.6.16.1 List of Packager codes 5.6.16.2 List of products with given Packager code 5.6.16.3 List of Packaging cities 5.6.16.4 List of products with given Packaging city

teolemon commented 8 years ago

Reference at http://en.wiki.openfoodfacts.org/API

herau commented 7 years ago

@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 ?

teolemon commented 7 years ago

if it's read, do it on prod. if it's write, the api login and pwd for .net are: off

herau commented 7 years ago

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 Requiredresponse.

teolemon commented 7 years ago

off / off

herau commented 7 years ago

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

herau commented 7 years ago

Not finished yet

teolemon commented 7 years ago

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…)

herau commented 7 years ago

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

teolemon commented 7 years ago

Closing this bug. It's been merged.