Volvo: change methods to public (#3900)

This commit is contained in:
Elina Urbanovich 2022-07-20 17:48:24 +03:00 • committed by GitHub
parent 7a3c1ee65a
commit 595a2ca8b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,16 +60,16 @@ func NewVolvoFromConfig(other map[string]interface{}) (api.Vehicle, error) {
}),
}
v.statusG = provider.Cached(v.status, cc.Cache)
v.statusG = provider.Cached(v.StatusRequest, cc.Cache)
var err error
v.vin, err = ensureVehicle(cc.VIN, v.vehicles)
v.vin, err = ensureVehicle(cc.VIN, v.Vehicles)
return v, err
}
// vehicles implements returns the list of user vehicles
func (v *Volvo) vehicles() ([]string, error) {
func (v *Volvo) Vehicles() ([]string, error) {
var vehicles []string
uri := fmt.Sprintf("%s/customeraccounts", volvo.ApiURI)
@ -92,7 +92,7 @@ func (v *Volvo) vehicles() ([]string, error) {
return vehicles, err
}
func (v *Volvo) status() (volvo.Status, error) {
func (v *Volvo) StatusRequest() (volvo.Status, error) {
var res volvo.Status
uri := fmt.Sprintf("%s/vehicles/%s/status", volvo.ApiURI, v.vin)