I have an API Call with a bunch of Information coming back as JSON:
{
"resortid": 999001,
"resortname": "Arinsal",
"resortcountry": "Andorra",
"newsnow_cm": 12,
"newsnow_in": 4.7,
"lowersnow_cm": 0,
"lowersnow_in": 0,
"uppersnow_cm": 0,
"uppersnow_in": 0,
"pctopen": 0,
"lastsnow": "19/05/2015",
"reportdate": "26/05/2015",
"reporttime": "13:27",
"conditions": "Closed for snowsports"
}
I’d like to have each Attribute as a different item, so I could just have items with JSON-Transformation like
Number Resort_newsnow "Neuschnee [%s]" {http="<[https://api.weatherunlocked.com/api/snowreport/222037?app_id=xxx&app_key=yyy:900000:JSONPATH($.newsnow_cm)]"}
Number Resort_uppersnow "Schnee Berg[%s]" {http="<[https://api.weatherunlocked.com/api/snowreport/222037?app_id=xxx&app_key=yyy:900000:JSONPATH($.uppersnow_cm)]"}
(...)
This would result in multiple requests, right? I’d like to stay within the free plan (10req/min, 1000req/day) So, would I make a rule out of it and parse the JSON in there? or is there some better or easier way to do this?