BMW: fix vehicles list (#3876)

This commit is contained in:
andig 2022-07-17 17:08:57 +02:00 • committed by GitHub
parent 7ce0297ffa
commit 76d5c5b60e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ type API struct {
func NewAPI(log *util.Logger, brand string, identity oauth2.TokenSource) *API {
v := &API{
Helper: request.NewHelper(log),
xUserAgent: fmt.Sprintf("android(SP1A.210812.016.C1);%s;2.5.2(14945)", brand),
xUserAgent: fmt.Sprintf("android(SP1A.210812.016.C1);%s;2.5.2(14945);row", brand),
}
// replace client transport with authenticated transport
@ -43,7 +43,7 @@ func NewAPI(log *util.Logger, brand string, identity oauth2.TokenSource) *API {
func (v *API) eadrax() (VehiclesStatusResponse, error) {
var res VehiclesStatusResponse
uri := fmt.Sprintf("%s/eadrax-vcs/v1/vehicles?apptimezone=60&appDateTime=%d", CocoApiURI, time.Now().Unix())
uri := fmt.Sprintf("%s/eadrax-vcs/v1/vehicles?apptimezone=120&appDateTime=%d", CocoApiURI, time.Now().Unix())
req, err := request.New(http.MethodGet, uri, nil, map[string]string{
"Content-Type": request.JSONContent,