Jump to content

User talk:Charlesnepote: Difference between revisions

More complex examples
m (+link)
(More complex examples)
Line 9: Line 9:
}}
}}


== Simple test ==
Products with funny barcodes:
{| class="wikitable"
! Code {{#for_external_table:<nowiki/>
{{!}}-
{{!}} {{{product}}}
}}
|}
== Test with "product" macro ==
Products with funny barcodes:
Products with funny barcodes:
{| class="wikitable"
{| class="wikitable"
Line 14: Line 24:
{{!}}-
{{!}}-
{{!}} {{Product|{{{product}}}}}
{{!}} {{Product|{{{product}}}}}
}}
|}
== Rich test chaining two requests ==
{{#get_web_data:
url=https://world.openfoodfacts.org/api/v2/search?code={{#for_external_table:{{{product}}},}}&fields=code,product_name
|format=JSON
|use jsonpath
|data=code=$.products[*].code,name=$.products[*].product_name
|cache seconds=360
|use stale cache
}}
Products with funny barcodes:
{| class="wikitable"
! Code
! Name {{#for_external_table:<nowiki/>
{{!}}-
{{!}} {{{code}}}
{{!}} {{{name}}}
}}
}}
|}
|}