Line 1: |
Line 1: |
− | I'm also going to use this page for some tests. | + | I'm also going to use this page for some tests with https://www.mediawiki.org/wiki/Extension:External_Data . |
| | | |
| {{#get_web_data: | | {{#get_web_data: |
Line 51: |
Line 51: |
| | | |
| {{#get_web_data: | | {{#get_web_data: |
− | url=https://world.openfoodfacts.org/category/vegetable-oils/nutrition-grade/b.json&fields=code,product_name&page_size=100 | + | url=https://world.openfoodfacts.org/category/vegetable-oils/nutrition-grade/b.json&fields=code,product_name&page_size=100&nocache=1 |
| |format=JSON | | |format=JSON |
| |use jsonpath | | |use jsonpath |
− | |data=code=$.products[*].code,name=$.products[*].product_name | + | |data=count=$.count,code=$.products[*].code,name=$.products[*].product_name |
| + | |cache seconds=360 |
| + | |use stale cache |
| + | }} |
| + | |
| + | {{#get_web_data: |
| + | url=https://world.openfoodfacts.org/category/vegetable-oils.json&fields=count&nocache=1 |
| + | |format=JSON |
| + | |use jsonpath |
| + | |data=count_category=$.count |
| |cache seconds=360 | | |cache seconds=360 |
| |use stale cache | | |use stale cache |
| }} | | }} |
| | | |
− | Vegetable oils with Nutri-Score B:
| + | {{#external_value:count}} of {{#external_value:count_category}} ({{#expr: ({{#external_value:count}} / {{#external_value:count_category}} * 100)round2}}%) vegetable oils with Nutri-Score B (100 products max displayed): |
| {| class="wikitable" | | {| class="wikitable" |
| ! Name | | ! Name |