mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -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
|
||||
|
||||
- .ID: `string` - The internal ID of the object
|
||||
- .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
|
||||
override them with any glpyh as seen above
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// segment struct, makes templating easier
|
||||
|
@ -31,8 +32,17 @@ const (
|
|||
|
||||
// NightscoutData struct contains the API data
|
||||
type NightscoutData struct {
|
||||
Sgv int64 `json:"sgv"`
|
||||
Direction string `json:"direction"`
|
||||
ID string `json:"_id"`
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue