openfoodfacts/openfoodfacts-dart

API v2: salt_100g=%3E10&salt_100g=%3C15

Opened this issue · 1 comments

Either there's a typo or I'm stupid (it's probably both), but using the same URL parameter twice is not very safe (I've even just typo-ed "very sage"). I know you do that in php but you add [] to the parameter name.
Anyway, with salt_100g=>10&salt_100g=<15 I would assume to find products with a salt_100g between 10 and 15.
And that's not the case:

{
	"count": 714,
	"page": 1,
	"page_count": 24,
	"page_size": 24,
	"products": [{
		"code": "8715035110106",
		"product_name": "Kikkoman Soy Sauce 150ml",
		"salt_100g": 16.9
	}, {
		"code": "0016000502666",
		"product_name": "Barre crunchy",
		"salt_100g": 18.1
	}, {
		"code": "8715035210301",
		"product_name": "Teriyaki Grillades et Marinades",
		"salt_100g": 11.6
	}, {
		"code": "5011544070034",
		"product_name": "Lo Salt",
		"salt_100g": 33.27
	}, {
		"code": "8715035150300",
		"product_name": "Sauce Soja Sans Gluten Tamari",
		"salt_100g": 16.4
	}, {
		"code": "5011428100048",
		"product_name": "Maldon Sea Salt Flakes",
		"salt_100g": 89
	}, {
		"code": "5000184221241",
		"product_name": "All Purpose Seasoning Aromat",
		"salt_100g": 57.9
	}, {
		"code": "50184385",
		"product_name": "Marmite yeast extract",
		"salt_100g": 10.8
	}, {
		"code": "8715035240308",
		"product_name": "Sojasauce sushi",
		"salt_100g": 13.4
	}, {
		"code": "5000184201199",
		"product_name": "Marmite Yeast Extract",
		"salt_100g": 10.8
	}, {
		"code": "5010024101381",
		"product_name": "Bisto Gravy",
		"salt_100g": 14.325
	}, {
		"code": "5000111044226",
		"product_name": "Light Soy Sauce",
		"salt_100g": 15.3
	}, {
		"code": "0078895126396",
		"product_name": "Premium Soy Sauce",
		"salt_100g": 17.2
	}, {
		"code": "00234931",
		"product_name": "6 Wholemeal Pittas",
		"salt_100g": 10.3
	}, {
		"code": "01992601",
		"product_name": "Salt",
		"salt_100g": 100
	}, {
		"code": "4088600216638",
		"product_name": "Dark Soy Sauce",
		"salt_100g": 14.7
	}, {
		"code": "8410300102854",
		"product_name": "Bouillon de poulet",
		"salt_100g": 58.11
	}, {
		"code": "5000111044202",
		"product_name": "Soy Sauce - Dark",
		"salt_100g": 15.8
	}, {
		"code": "5036040143136",
		"product_name": "Bisto gravy granules",
		"salt_100g": 10.3
	}, {
		"code": "8722700268727",
		"product_name": "Chicken Stock Pot",
		"salt_100g": 15.2
	}, {
		"code": "5000175411217",
		"product_name": "Sparkling Water",
		"salt_100g": 34.13
	}, {
		"code": "8715000029723",
		"product_name": "Liquid Seasoning",
		"salt_100g": 24.86
	}, {
		"code": "20107819",
		"product_name": "Sel de Mer",
		"salt_100g": 88.575
	}, {
		"code": "5000128120111",
		"product_name": "Table salt",
		"salt_100g": 100
	}],
	"skip": 0
}