Shorten custom API command

hello there… Is there some way to short these commands, because I wanted to fit them both in 1. Better explaining:

This command shows the ISS speed in miles: $(eval try{a=JSON.parse($(urlfetch json;b=a.units;ISS Vel: ${a.velocity.toFixed()} ${b} | Alt: ${a.altitude.toFixed()} ${b};}catch(e){})

And this one shows in Km: $(eval try {a=JSON.parse($(urlfetch json;b=a.units;ISS Vel: ${a.velocity.toFixed()} ${b}/hr | Alt: ${a.altitude.toFixed()} ${b};}catch(e){Err;})

I have been trying to short them but it shows up as “undefined”… I have shorten the links with “tinyurl” but is it possible to show miles AND km in 1 command? AND the command can only have 200 characthers because YouTube…
These are the links shorten:
for the miles/h ->
for the km/h ->


$(eval z=`$(urlfetch json`;$(urlfetch
1 Like

Thank youuuu!!! You’re the best, Roketto!

Looks like kilometre is default, why not just convert it to miles yourself since I believe that is what the ?unit=miles query does for you when you request that page.

That’s exactly what I did. If you check out the command response I posted, it fetches JS code from that converts the altitude and velocity data from km to miles.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.