Changes

Jump to navigation Jump to search
12 bytes removed ,  14:27, 29 October 2016
Line 2,096: Line 2,096:  
* URL for your tests : <pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl</pre>
 
* URL for your tests : <pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl</pre>
 
==== Quick overview ====
 
==== Quick overview ====
** var foodfact = { barcode : '0048151623426', name : 'Product name', energy: 500, energy_unit: "kJ", weight: 282 };
+
* var foodfact = { barcode : '0048151623426', name : 'Product name', energy: 500, energy_unit: "kJ", weight: 282 };
** var postData = {
+
* var postData = {
** code        : foodfact.barcode,
+
* code        : foodfact.barcode,
** user_id      : "mesinfosnutritionelles",
+
* user_id      : "mesinfosnutritionelles",
** password    : "****",
+
* password    : "****",
** product_name : foodfact.name?foodfact.name:foodfact.shop_label,
+
* product_name : foodfact.name?foodfact.name:foodfact.shop_label,
** quantity    : foodfact.weight?""+foodfact.weight+" g":undefined,
+
* quantity    : foodfact.weight?""+foodfact.weight+" g":undefined,
** stores      : "Walmart",
+
* stores      : "Walmart",
** nutriment_energy      :foodfact.energy,
+
* nutriment_energy      :foodfact.energy,
** nutriment_energy_unit :foodfact.energy_unit,
+
* nutriment_energy_unit :foodfact.energy_unit,
** nutrition_data_per    :"serving"
+
* nutrition_data_per    :"serving"
** {"status_verbose":"fields saved","status":1}
+
* {"status_verbose":"fields saved","status":1}
    
==== Example ====
 
==== Example ====

Navigation menu