urlfetch issues

Asked May 10, 2020·2 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I'm trying to fetch data from an api that requires 2 strings. Below is what I have tried, but it doesn't work. Any suggestions?
Thanks!

!test Query1 Query2
$(eval cur=$(query).split(' ');
function conv(c1, c2) {
xc=$(urlfetch https://some.api.io/latest?base=c1&symbols=c2); }
conv(cur[0],cur[1]);)

2 replies

Hiya, see this example how to nest variables inside an urlfetch with eval: (link expired)