Line 43: |
Line 43: |
| * page=2 | | * page=2 |
| * jqm=1 to search results pages on the web site to get results in a jquerymobile format. | | * jqm=1 to search results pages on the web site to get results in a jquerymobile format. |
− | ===== Examples<sup>(remember to do tests on .net)</sup> ===== | + | ===== Examples<sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup> ===== |
| <pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1</pre> | | <pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1</pre> |
| <pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1</pre> | | <pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1</pre> |
Line 168: |
Line 168: |
| ** imgupload_nutrition: your image file if imagefield:nutrition | | ** imgupload_nutrition: your image file if imagefield:nutrition |
| | | |
− | Example: <sup>(remember to do tests on .net)</sup> | + | Example: <sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup> |
| <pre> | | <pre> |
| http://world.openfoodfacts.org/cgi/product_image_upload.pl | | http://world.openfoodfacts.org/cgi/product_image_upload.pl |
Line 174: |
Line 174: |
| | | |
| === Posting a new product === | | === Posting a new product === |
− | * Product post to http://world.openfoodfacts.org/cgi/product_jqm2.pl <sup>(remember to do tests on .net)</sup> | + | * Product post to http://world.openfoodfacts.org/cgi/product_jqm2.pl <sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup> |
| ** var foodfact = { barcode : '3073780969000', name : 'KIRI GOUTER 280G 8 PORTIONS', energy: 500, energy_unit: "kJ", weight: 282 }; | | ** var foodfact = { barcode : '3073780969000', name : 'KIRI GOUTER 280G 8 PORTIONS', energy: 500, energy_unit: "kJ", weight: 282 }; |
| ** var postData = { | | ** var postData = { |
Line 188: |
Line 188: |
| ** {"status_verbose":"fields saved","status":1} | | ** {"status_verbose":"fields saved","status":1} |
| | | |
− | <br>Example: <sup>(remember to do tests on .net)</sup><br> | + | <br>Example: <sup>(remember to do tests on world.openfoodfacts.net - login and password: off)</sup><br> |
| <pre>http://world.openfoodfacts.org/cgi/product_jqm2.pl?code=3073780969000&user_id=usernameexample&password=*****&product_name=KIRI%20GOUTER%20280G%208%20PORTIONS&quantity=282%20g&stores=Intermarch%C3%A9&nutriment_energy=500&nutriment_energy_unit=kJ&nutrition_data_per=serving</pre> | | <pre>http://world.openfoodfacts.org/cgi/product_jqm2.pl?code=3073780969000&user_id=usernameexample&password=*****&product_name=KIRI%20GOUTER%20280G%208%20PORTIONS&quantity=282%20g&stores=Intermarch%C3%A9&nutriment_energy=500&nutriment_energy_unit=kJ&nutrition_data_per=serving</pre> |
| | | |
| == Roadmap == | | == Roadmap == |
| [[API/Roadmap]] | | [[API/Roadmap]] |