These are chat archives for nightscout/ios

30th
Jul 2015
Jason Calabrese
@jasoncalabrese
Jul 30 2015 00:31
(cross post)
I'm thinking about some changes to the status.json and status.js structure wondering what it's being used for outside of Nightscout now. If you're using it let me know.
@someoneAnyone think you were using it, but not sure it it was just planned
Pete
@someoneAnyone
Jul 30 2015 01:26
I am using it.
I pull the thresholds and settings from the site.
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:28
Great, was just going to ask for a link
There's some weird duplication in there
Pete
@someoneAnyone
Jul 30 2015 01:28
huh?
I make not claims that is perfect. I've been backward engineering it.
:-)
I have the code open here... where should i look?
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:30
Some code looks for mgdl and some looks for mg/dl
Pete
@someoneAnyone
Jul 30 2015 01:32
its an enum.
i can't have / in the var name
I use the string from the json strong type it.
I haven't really tested against a moll site so I'm not how it would yet.
I've noticed some installations have a name field and a unit field in the json root as well as in the defaults object.
which is more correct?
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:35
It hasn't really been defined, it's used by the app
I'm trying to clean it up and noticing lots of little differences
Thinking it might be time for some breaking changes
Pete
@someoneAnyone
Jul 30 2015 01:37
i'll try to stay in the loop so I can keep the my app running. Just let me know what your thinking.
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:38
With the pebble endpoint we kept trying to maintain compatability, and that didn't work out so well
Pete
@someoneAnyone
Jul 30 2015 01:38
If you look at my swift file... I end up doing a lot of string matching, then I create enums that I can switch against. I found enabledOptions odd.. should probably be an array
maybe time for api/v2
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:38
Maybe but I don't want to maintain v1
Everything underneath is changing, and there's nothing really defined for v1
Not sure what's best
Pete
@someoneAnyone
Jul 30 2015 01:40
still might better just to rev it so that there is a clean break
i could live with it either way.
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:41
So rename v1 to v2 and return a 404 for v1?
Maybe a redirect with a param
Pete
@someoneAnyone
Jul 30 2015 01:42
if it won't work any more... I read some where that you should also alias the api/ to the most current version
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:43
Maybe
Pete
@someoneAnyone
Jul 30 2015 01:44
i think it was a talk i listened to from apiagie or something like that
i think there is an updated video on their site.
kenstack
@kenstack
Jul 30 2015 01:52
@jasoncalabrese with v2 it would be really helpful if there was a doc that contained the output parameters based on settings - that would be really helpful
Pete
@someoneAnyone
Jul 30 2015 01:53
I agree. I can try to help
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:53
Yeah, I'd like that too
i like their documentation but swagger is nice too
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:53
Ben setup something with swagger before, that would be nice
Pete
@someoneAnyone
Jul 30 2015 01:53
i'm not familiar with weck... oh
Jason Calabrese
@jasoncalabrese
Jul 30 2015 01:54
I get swagger and wrecker mixed up
Think Ben used both with that
Pete
@someoneAnyone
Jul 30 2015 01:54
whats nice with swagger (theoretically) it can spit out platform code for other to use automaticly
Pete
@someoneAnyone
Jul 30 2015 14:58
@jasoncalabrese , I was playing with the status.json a bit what do you think this structure? https://gist.github.com/someoneAnyone/b3d1b1d9062664c29687
It seems like status should be something other than a string. Same with alarm_types...and time format.
Jason Calabrese
@jasoncalabrese
Jul 30 2015 15:04
I have something a little different now, that matches the internal structure