mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
chore(nightscout): add all object properties
This commit is contained in:
parent
1075b82e10
commit
30c82c2f56
|
@ -79,7 +79,16 @@ if that color is visible against any of your backgrounds.
|
||||||
|
|
||||||
## Template Properties
|
## Template Properties
|
||||||
|
|
||||||
|
- .ID: `string` - The internal ID of the object
|
||||||
- .Sgv: `int` - Your Serum Glucose Value (your sugar)
|
- .Sgv: `int` - Your Serum Glucose Value (your sugar)
|
||||||
|
- .Date: `int` - The unix timestamp of the entry
|
||||||
|
- .DateString: `time` - The timestamp of the entry
|
||||||
|
- .Trend: `int` - The trend of the entry
|
||||||
|
- .Device: `string` - The device linked to the entry
|
||||||
|
- .Type: `string` - The type of the entry
|
||||||
|
- .UtcOffset: `int` - The UTC offset
|
||||||
|
- .SysTime: `time` - The time on the system
|
||||||
|
- .Mills: `int` - The amount of mills
|
||||||
- .TrendIcon: `string` - By default, this will be something like ↑↑ or ↘ etc but you can
|
- .TrendIcon: `string` - By default, this will be something like ↑↑ or ↘ etc but you can
|
||||||
override them with any glpyh as seen above
|
override them with any glpyh as seen above
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// segment struct, makes templating easier
|
// segment struct, makes templating easier
|
||||||
|
@ -31,8 +32,17 @@ const (
|
||||||
|
|
||||||
// NightscoutData struct contains the API data
|
// NightscoutData struct contains the API data
|
||||||
type NightscoutData struct {
|
type NightscoutData struct {
|
||||||
Sgv int64 `json:"sgv"`
|
ID string `json:"_id"`
|
||||||
Direction string `json:"direction"`
|
Sgv int `json:"sgv"`
|
||||||
|
Date int64 `json:"date"`
|
||||||
|
DateString time.Time `json:"dateString"`
|
||||||
|
Trend int `json:"trend"`
|
||||||
|
Direction string `json:"direction"`
|
||||||
|
Device string `json:"device"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
UtcOffset int `json:"utcOffset"`
|
||||||
|
SysTime time.Time `json:"sysTime"`
|
||||||
|
Mills int64 `json:"mills"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ns *nightscout) enabled() bool {
|
func (ns *nightscout) enabled() bool {
|
||||||
|
|
Loading…
Reference in a new issue