Coder Social home page Coder Social logo

API Enhancement request. about spike HOT 8 CLOSED

spikeapp avatar spikeapp commented on June 14, 2024
API Enhancement request.

from spike.

Comments (8)

miguelkennedy avatar miguelkennedy commented on June 14, 2024

Spike already has a status endpoint

http://127.0.0.1:1979/api/v1/status.json

But probably not all info you want is there as this endpoint was added some time ago and most info was not relevant to Spike at the time...

I will see if I can add the missing info soon

from spike.

PedanticAvenger avatar PedanticAvenger commented on June 14, 2024

from spike.

miguelkennedy avatar miguelkennedy commented on June 14, 2024

https://github.com/PedanticAvenger/FlashCGM

This one?

from spike.

miguelkennedy avatar miguelkennedy commented on June 14, 2024

Actually... Just checked and I already implemented thresholds and units in Spike awhile ago

Here's a sample output from http://127.0.0.1:1979/api/v1/status.json

{
"status": "ok",
"apiEnabled": true,
"serverTimeEpoch": 1526182575945,
"name": "Nightscout",
"careportalEnabled": false,
"authorized": null,
"settings": {
"editMode": "on",
"alarmTimeagoUrgentMins": "30",
"enable": [
"careportal",
"iob",
"cob",
"bwp",
"treatmentnotify",
"basal",
"pushover",
"maker",
"sage",
"boluscalc",
"rawbg",
"upbat",
"pushover",
"treatmentnotify",
"bgnow",
"delta",
"direction",
"timeago",
"devicestatus",
"errorcodes",
"profile",
"simplealarms"
],
"DEFAULT_FEATURES": [
"bgnow",
"delta",
"direction",
"timeago",
"devicestatus",
"upbat",
"errorcodes",
"profile"
],
"timeFormat": 24,
"units": "mg/dl",
"alarmTimeagoWarnMins": 15,
"focusHours": 3,
"alarmUrgentHighMins": [
30,
45,
60,
90,
120
],
"showRawbg": "always",
"alarmHigh": true,
"language": "en",
"showPlugins": "careportal iob cob bwp treatmentnotify basal pushover maker sage boluscalc rawbg upbat delta direction upbat rawbg",
"alarmTimeagoUrgent": true,
"customTitle": "Spike",
"alarmUrgentHigh": true,
"alarmTypes": [
"simple"
],
"authDefaultRoles": "readable",
"alarmTimeagoWarn": true,
"alarmUrgentLow": true,
"thresholds": {
"bgTargetBottom": 70,
"bgLow": 55,
"bgHigh": 170,
"bgTargetTop": 200
},
"alarmUrgentMins": [
30,
60,
90,
120
],
"heartbeat": "10",
"alarmLowMins": [
15,
30,
45,
60,
90,
120
],
"theme": "colors",
"scaleY": "log-dynamic",
"nightMode": false,
"showForecast": "ar2",
"alarmUrgentLowMins": [
5,
15,
30,
45,
60,
90,
120
],
"alarmHighMins": [
30,
45,
60,
90,
120
],
"alarmWarnMins": [
30,
60,
90,
120
],
"alarmLow": true,
"baseURL": "http://127.0.0.1:1979"
},
"boluscalcEnabled": false,
"version": "0.10.3-dev-20171205",
"head": "",
"extendedSettings": {
"basal": {
"render": "default"
},
"timeago": {
"enableAlerts": true
},
"sage": {
"warn": 504,
"enableAlerts": true,
"info": 336
},
"errorcodes": {
"warn": "1 2 3 4 5 6 7 8",
"info": "1 2 3 4 5 6 7 8",
"urgent": "9 10"
}
},
"serverTime": "2018-05-13T03:36:15.000+0000"
}

As you can see, both units and thresholds are already present in Spike's internal server

from spike.

PedanticAvenger avatar PedanticAvenger commented on June 14, 2024

from spike.

PedanticAvenger avatar PedanticAvenger commented on June 14, 2024

from spike.

miguelkennedy avatar miguelkennedy commented on June 14, 2024

Yes...

You can also use count to get the amount of readings you need... Example http://127.0.0.1:1979/api/v1/sgv.json?count=12

from spike.

PedanticAvenger avatar PedanticAvenger commented on June 14, 2024

Thanks for the timely responses! Looks like we are good here.

from spike.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.