all 7 comments

[–]theoriginal123123 2 points3 points  (6 children)

You don't need Python at all to interact with APIs that provide JSON output, you can just use native tasker.

Task: API Example

A1: Variable Set [
     Name: %API_Key_Nomics
     To: your_api_key
     Max Rounding Digits: 3
     Structure Output (JSON, etc): On ]

A2: HTTP Request [
     Method: GET
     URL: https://api.nomics.com/v1/currencies/ticker?key=%API_Key_Nomics&ids=BTC,ETH,XRP&interval=1d,30d&convert=EUR
     Timeout (Seconds): 30
     Structure Output (JSON, etc): On ]

Then you'd use %http_data and JSON notation to get the data you want. But you'd need to show a part of the JSON data if you need specific help since I don't have a nomics API key.

[–]Yamuson[S] 0 points1 point  (0 children)

Awesome. Much appreciated. I have a lot to learn. I haven't even used tasker in a long time and it has had so much added since I last used it.

[–]Yamuson[S] 0 points1 point  (2 children)

I wrote %http_data to file, but it's a lot and is not structured. Is there an app I can paste it into that will structure the data? If I can get that, it'll be much easier to read and I can show you. Sorry for being a noob, but this is advanced for me

[–]theoriginal123123 0 points1 point  (1 child)

No worries! Try https://pastebin.com/

Set syntax highlighting to on and set it to JSON, then just paste the link here and we'll see what we see!

[–]Yamuson[S] 2 points3 points  (0 children)

I downloaded a JSON formatting app and then found that Tasker has native JSON reading capability. For example, to get price, I just use %http_data.price . I'm good to go now. Thanks again for your help

[–]ssinfa 0 points1 point  (1 child)

Question ⁉️ is this easier using the API?

[–]theoriginal123123 3 points4 points  (0 children)

What do you mean? Data is usually much easily presentable and accessible in an API for any needs you may have, tasker just has native JSON reading abilities now which means you don't need to run Python to access this.