File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- let appID = " " #YOUR APP_ID
1+ let appID = $env .WOLFRAMALPHA_APPID
22
33#Fetch simple answer from WolframAlpha API
4- def wolfram [... query #Your query
4+ def wolfram [... query
55] {
66 let query_string = ($query | str join " " )
7- let result = (http get (" https://api.wolframalpha.com/v1/result?" + ([[appid i ]; [$appID $query_string ]] | url build-query )))
7+ let result = (http get (" https://api.wolframalpha.com/v1/result?" + ([[key value ]; [appid $appID ] [ i $query_string ]] | url build-query )))
88 $result + " "
99}
1010
1111#Fetch image with full answer from WolframAlpha API
12- def wolframimg [... query #Your query
12+ def wolframimg [... query
1313] {
1414 let query_string = ($query | str join " " )
1515 let filename = ($query_string + " .png" )
16- let link = (" https://api.wolframalpha.com/v1/simple?" + ([[appid i ]; [$appID $query_string ]] | url build-query ) + " &background=F5F5F5&fontsize=20" )
16+ let link = (" https://api.wolframalpha.com/v1/simple?" + ([[key value ]; [appid $appID ] [ i $query_string ]] | url build-query ) + " &background=F5F5F5&fontsize=20" )
1717 http get $link | save $filename
1818 echo (" Query result saved in file: " + $filename )
1919}
You can’t perform that action at this time.
0 commit comments