I coded everything and it works using the sample json.placeholder.typicode.com
When I go put the websites that I could use, I get a "Failed invoking <symbol>". I am assuming that is basically a memory overload/too big of a response.
On a widget my makeWebRequest works fine in returning data.
I need some help finding a work around on this.
- Can I send the response to another class to parse it and send it back? I assume that won't work as I am still in the background process memory allocation.
- Can I parse the response to exclude what I don't need? I tried with using exclude parameters, but I don't seem to be able to use it properly and/or doesn't make a difference. Down here a samples response that I could use, but I only need the extremes part.
- If I can't do it on the watch face directly, can I use some other widget to save the data and then access it on the watchface separately?
Request:
www.worldtides.info/apiResponse:
{"status":200,"callCount":1,"copyright":"Tidal data retrieved from www.worldtide.info. Copyright (c) 2014-2017 Brainware LLC. Licensed for use of individual spatial coordinates on behalf of\/by an end-user. Copyright (c) 2010-2016 Oregon State University. Licensed for individual spatial coordinates via ModEM-Geophysics Inc. NO GUARANTEES ARE MADE ABOUT THE CORRECTNESS OF THIS DATA. You may not use it if anyone or anything could come to harm as a result of using it (e.g. for navigational purposes).","requestLat":9.98,"requestLon":-85.64,"responseLat":10,"responseLon":-85.6667,"atlas":"TPXO_8_v1","extremes":[{"dt":1526126685,"date":"2018-05-12T12:04+0000","height":-0.726,"type":"Low"},{"dt":1526149380,"date":"2018-05-12T18:23+0000","height":0.874,"type":"High"},{"dt":1526172190,"date":"2018-05-13T00:43+0000","height":-0.829,"type":"Low"},{"dt":1526194222,"date":"2018-05-13T06:50+0000","height":0.757,"type":"High"}]}or as an alternative request:
api.surfline.com/.../5559I like the data but the response is much bigger.