mIRC Home    About    Download    Register    News    Help

Print Thread
API/JSON reading #258101 09/06/16 10:06 PM
Joined: Sep 2014
Posts: 83
H
HappyFappy Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
ok guys, so basically I need help

I understand how the JSON script works

but im attempting an API that does NOT use "" for categories

ex: "LTC":20292;"DOGE":9384;

but instead it uses: LTC:92323;DOGE:93082

How can I get this to look for DOGE?

This is what I have....
Code:
alias maincheck {
  JSONOpen -duw height https://www.eobot.com/api.aspx?total=423282?doge=v.altitude
  JSONURLOption height Cache-Control no-cache
  JSONGet height
  echo -a $json(height,DOGE)
}


heres what the API looks like:

Code:
Total:0.00094489;BTC:0.00000000;ETH:0.00000000;LTC:0.00000000;DAO:0.00000000;DOGE:3.00000000;XRP:0.00000000;DASH:0.00000000;RDD:0.00000000;BTS:0.00000000;CURE:0.00872575;XEM:0.00000000;XMR:0.00000000;VOX:0.00000000;FCT:0.00000000;BCN:0.00000000;PPC:0.00000000;LSK:0.00000000;MAID:0.00000000;BLK:0.00000000;GRC:0.00002008;GOLD:0.00000000;GHS:2.78868849;GHS2:0.00000000;SCRYPT:0.00000000;BPPD:0.00007349;PPD:10.83832093

Re: API/JSON reading [Re: HappyFappy] #258102 09/06/16 10:11 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
Your API is not JSON formatted.

I had today create something similar to this api for an other user have a look at this code: https://mypastebin.com/pI7LN1lnsPZq


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: API/JSON reading [Re: westor] #258103 09/06/16 10:14 PM
Joined: Sep 2014
Posts: 83
H
HappyFappy Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
Thank you Westor smile


I will look into this code smile

EDIT:
IT WORKS!

I got it working!, thanks so much

Last edited by HappyFappy; 09/06/16 10:38 PM.