Skip to content

Commit

Permalink
Add/correct comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored and michaelharo committed Apr 24, 2021
1 parent 6a18ac8 commit 4671cb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"golang.org/x/oauth2"
)

// ClientOption can be passed when creating the client
type ClientOption func(c *Client) error

// WithToken provides an oauth2.Token to the client for auth.
Expand Down
4 changes: 2 additions & 2 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ func (v Vehicle) StopAirConditioning() error {
return err
}

// Sets the specified seat's heater level.
// SetSeatHeater sets the specified seat's heater level.
func (v Vehicle) SetSeatHeater(heater int, level int) error {
url := v.c.baseURL + "/vehicles/" + strconv.FormatInt(v.ID, 10) + "/command/remote_seat_heater_request"
payload := fmt.Sprintf(`{"heater":%d, "level":%d}`, heater, level)
_, err := v.c.post(url, []byte(payload))
return err
}

// Turn steering wheel heater on or off.
// SetSteeringWheelHeater turns steering wheel heater on or off.
func (v Vehicle) SetSteeringWheelHeater(on bool) error {
url := v.c.baseURL + "/vehicles/" + strconv.FormatInt(v.ID, 10) + "/command/remote_steering_wheel_heater_request"
payload := fmt.Sprintf(`{"on":%t}`, on)
Expand Down

0 comments on commit 4671cb4

Please sign in to comment.