Develop
Starting from 1.1.70, Aris provides a few plugins which you can work with to develop plugins based on HTTP request. Here we'll have a simple example on getting currency to walk you into the usage of these plugins.
To begin with, type "dddddvlp" to enable develop plugins.
We can get currency rates for various of currencies using this API:
https://api.fixer.io/latest?base=CNY&symbols=USD
So now copy this url and execute "copy->post"
Within seconds, the console will output
{"base":"CNY","date":"2017-11-20","rates":{"USD":0.15074}}
Now, you can connect this message to plugin JGET directly using connect operator. For instance, use
->jget rates
then you'll have
{"USD":0.15074}
To take one further step, if you only need the value for USD against CNY, just do
->jget USD
That is to say, the full code of getting the value for CNY against USD is:
https://api.fixer.io/latest?base=CNY&symbols=USD->post->jget rates->jget usd
Now you've created your very first script, congratulations! So I guess you'd very like to save this script so you can check the rate once in a while. Sure can do by connecting your script with "add" and name it "usd" like this:
https://api.fixer.io/latest?base=CNY&symbols=USD->>post->jget rates->jget usd->add usd
After the script is saved, you can simply use usd to get the currency rate.
Now let's say you have multiple currencies to watch, then you'll need $s as parameter and save the script so you can use it to get differenct currency rates against CNY. Now the script goes like:
https://api.fixer.io/latest?base=CNY&symbols=$s->post->jget rates->jget usd->add currency
Now you can use
USD->currency
to get currency rate of USD agains CNY.
--To be continued--