Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthURI = "https://account-fk.niu.com" ApiURI = "https://app-api-fk.niu.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Data struct { IsCharging int `json:"isCharging,omitempty"` IsConnected bool `json:"isConnected,omitempty"` Timestamp int64 `json:"time,omitempty"` Batteries struct { CompartmentA struct { BatteryCharging int64 `json:"batteryCharging,omitempty"` } `json:"compartmentA"` } // LeftTime float32 `json:"leftTime,omitempty"` EstimatedMileage int64 `json:"estimatedMileage,omitempty"` } }
Response is the Niu motor_data api response https://app-api-fk.niu.com/v3/motor_data/index_info?sn=<ScooterSerialNumber>
type Token ¶
https://account-fk.niu.com/v3/api/oauth2/token?account=<NiuUser>&app_id=niu_8xt1afu6&grant_type=password&password=<MD5PasswordHash>&scope=base
func (*Token) UnmarshalJSON ¶
UnmarshalJSON decodes the token api response
Click to show internal directories.
Click to hide internal directories.