I would like to program my spark core and have it read weather from an online weather source. I’ve looked into the yahoo weather API but I am not sure how to make good use out of it. Has anyone tried to implement any sort of similar behavior like this?
It should be doable, but Yahoo uses an RSS/XML response, which could be clunky to parse on the Spark. Their sample response is 2,420 bytes of data, which can eat up a lot of RAM. Just be careful how you parse!
Yes! You can use the TCPClient class to perform an HTTP GET. There's an example there to get you started, as well as a few examples in the forum. Just search for "HTTP" or "TCPClient" to find them.
Yes the Spark Core can make simple HTTP requests (GET, POST, DELETE, PUT, etc), but right now it’s difficult to call https endpoints directly from the core, something we’re working on!