Documentation ¶
Index ¶
Constants ¶
View Source
const ( BffUriEMEA = "https://bff.emea-prod.mobilesdk.mercedes-benz.com" WidgetUriEMEA = "https://widget.emea-prod.mobilesdk.mercedes-benz.com" BffUriAPAC = "https://bff.amap-prod.mobilesdk.mercedes-benz.com" WidgetUriAPAC = "https://widget.amap-prod.mobilesdk.mercedes-benz.com" BffUriNORAM = "https://bff.amap-prod.mobilesdk.mercedes-benz.com" WidgetUriNORAM = "https://widget.amap-prod.mobilesdk.mercedes-benz.com" IdUri = "https://id.mercedes-benz.com" ClientId = "01398c1c-dc45-4b42-882b-9f5ba9f175f1" RisApplicationVersionEMEA = "1.44.0" RisSdkVersionEMEA = "2.150.1" RisApplicationVersionAPAC = "1.44.0" RisSdkVersionAPAC = "2.150.1" RisApplicationVersionNORAM = "3.42.0" RisSdkVersionNORAM = "2.150.1" RisOsVersion = "17.3" RisOsName = "ios" XApplicationNameEMEA = "mycar-store-ece" XApplicationNameAPAC = "mycar-store-ap" XApplicationNameNORAM = "mycar-store-us" UserAgent = "MyCar/%s (com.daimler.ris.mercedesme.%s.ios; %s %s) Alamofire/5.4.0" UserAgentAPAC = "mycar-store-ap v%s, %s %s, SDK %s" Locale = "en-GB" CountryCode = "EN" )
Variables ¶
View Source
var OAuth2Config = &oauth2.Config{ Endpoint: oauth2.Endpoint{ TokenURL: fmt.Sprintf("%s/as/token.oauth2", IdUri), AuthStyle: oauth2.AuthStyleInParams, }, Scopes: []string{"not_needed", "handled", "elsewhere"}, }
OAuth2Config is the OAuth2 configuration for authenticating with the MercedesAPI.
View Source
var Regions = map[string]string{
"apac": "Asia-Pacific",
"ece": "ECE",
"noram": "North-America",
}
Functions ¶
func MapChargeStatus ¶
func MapChargeStatus(lookup int) api.ChargeStatus
Types ¶
type Identity ¶
type Identity struct { *request.Helper oauth2.TokenSource Sessionid string // contains filtered or unexported fields }
type PinRequest ¶
type PinResponse ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
type SetupAPI ¶
func (*SetupAPI) RequestAccessToken ¶
type StatusResponse ¶
type StatusResponse struct { VehicleInfo struct { Odometer struct { Value int Unit string } Timestamp time.Time } EvInfo struct { Battery struct { ChargingStatus int DistanceToEmpty struct { Value int Unit string } StateOfCharge float64 // 75 EndOfChargeTime int // Minutes after midnight TotalRange int // 17 } Timestamp time.Time } LocationResponse struct { TimeStamp time.Time Longitude float64 Latitude float64 } Timestamp time.Time }
type VehiclesResponse ¶
type VehiclesResponse struct {
AssignedVehicles []Vehicle
}
Click to show internal directories.
Click to hide internal directories.