-
• #2
You need to use the Bangle.js variant of GadgetBridge. Have a look at https://www.espruino.com/Gadgetbridge#http-requests .
You can also have a look at https://github.com/espruino/BangleApps/tree/master/apps/owmweather since that does something similar to what you probably want to do. -
• #3
Ah, I see where my confusion was. I was trying to use the fetch command, instead of the appropriate "Bangle.http" command. Thank you for pointing this out to me!
I am trying to write an app to fetch data from a website, but I was reading on here that the watch does not have its own WiFi (obviously), but Gadgetbridge does not like to have internet functionality for privacy reasons. Is there any way for me to fetch information from a URL? For reference, I'm trying to get the data from this link here:
https://labs.waterdata.usgs.gov/sta/v1.1/Things('USGS-09380000')/Datastreams?$expand=Observations($orderby=phenomenonTime%20desc;$top=1;$select=result)&$select=unitOfMeasurement,description
It returns JSON already, so easy to manage. I tried uploading the code to the IDE, but it doesn't recognize fetch which may be because of the aforementioned lack of internet functionality. Does anyone know if I'm wrong, or if it's possible another way?