chore: refactor Skoda folder structure
Some checks failed
Some checks failed
This commit is contained in:
parent
63d152c90e
commit
634bc4513d
7 changed files with 13 additions and 13 deletions
|
|
@ -6,8 +6,8 @@ import (
|
|||
"github.com/evcc-io/evcc/api"
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/evcc-io/evcc/util/request"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda/myskoda"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda/myskoda/service"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda/service"
|
||||
)
|
||||
|
||||
// https://gitlab.com/prior99/skoda
|
||||
|
|
@ -15,7 +15,7 @@ import (
|
|||
// Enyaq is an api.Vehicle implementation for Skoda Enyaq cars
|
||||
type Enyaq struct {
|
||||
*embed
|
||||
*myskoda.Provider // provides the api implementations
|
||||
*skoda.Provider // provides the api implementations
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -50,17 +50,17 @@ func NewEnyaqFromConfig(other map[string]interface{}) (api.Vehicle, error) {
|
|||
log := util.NewLogger("enyaq").Redact(cc.User, cc.Password, cc.VIN)
|
||||
|
||||
// use Skoda api to resolve list of vehicles
|
||||
ts, err := service.TokenRefreshServiceTokenSource(log, myskoda.TRSParams, myskoda.AuthParams, cc.User, cc.Password)
|
||||
ts, err := service.TokenRefreshServiceTokenSource(log, skoda.TRSParams, skoda.AuthParams, cc.User, cc.Password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
api := myskoda.NewAPI(log, ts)
|
||||
api := skoda.NewAPI(log, ts)
|
||||
api.Client.Timeout = cc.Timeout
|
||||
|
||||
vehicle, err := ensureVehicleEx(
|
||||
cc.VIN, api.Vehicles,
|
||||
func(v myskoda.Vehicle) (string, error) {
|
||||
func(v skoda.Vehicle) (string, error) {
|
||||
return v.VIN, nil
|
||||
},
|
||||
)
|
||||
|
|
@ -75,10 +75,10 @@ func NewEnyaqFromConfig(other map[string]interface{}) (api.Vehicle, error) {
|
|||
|
||||
// reuse tokenService to build provider
|
||||
if err == nil {
|
||||
api := myskoda.NewAPI(log, ts)
|
||||
api := skoda.NewAPI(log, ts)
|
||||
api.Client.Timeout = cc.Timeout
|
||||
|
||||
v.Provider = myskoda.NewProvider(api, vehicle.VIN, cc.Cache)
|
||||
v.Provider = skoda.NewProvider(api, vehicle.VIN, cc.Cache)
|
||||
}
|
||||
|
||||
return v, err
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package myskoda
|
||||
package skoda
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package myskoda
|
||||
package skoda
|
||||
|
||||
import "net/url"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package myskoda
|
||||
package skoda
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"net/url"
|
||||
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda/myskoda/tokenrefreshservice"
|
||||
"github.com/evcc-io/evcc/vehicle/skoda/tokenrefreshservice"
|
||||
"github.com/evcc-io/evcc/vehicle/vag"
|
||||
"github.com/evcc-io/evcc/vehicle/vag/vwidentity"
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package myskoda
|
||||
package skoda
|
||||
|
||||
// VehiclesResponse is the /v3/garage api
|
||||
type VehiclesResponse struct {
|
||||
Loading…
Add table
Add a link
Reference in a new issue