Skip to content

Commit

Permalink
Feature/media (#157)
Browse files Browse the repository at this point in the history
* Add media commands

* media_toggle_playback
* media_next_track
* media_prev_track
* media_next_fav
* media_prev_fav
* media_volume_up
* media_volume_down

* Add media specs

* Add vcr cassettes for media specs
  • Loading branch information
bricesanchez authored and timdorr committed Oct 3, 2019
1 parent 6664df5 commit c78212b
Show file tree
Hide file tree
Showing 9 changed files with 835 additions and 0 deletions.
28 changes: 28 additions & 0 deletions lib/tesla_api/vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,34 @@ def trigger_homelink(lat, lon)
command('trigger_homelink', body: {lat: lat, lon: lon})['response']
end

def media_toggle_playback
command('media_toggle_playback')['response']
end

def media_next_track
command('media_next_track')['response']
end

def media_prev_track
command('media_prev_track')['response']
end

def media_next_fav
command('media_next_fav')['response']
end

def media_prev_fav
command('media_prev_fav')['response']
end

def media_volume_up
command('media_volume_up')['response']
end

def media_volume_down
command('media_volume_down')['response']
end

private

def data_request(name)
Expand Down
109 changes: 109 additions & 0 deletions spec/cassettes/vehicle-media_next_fav.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

109 changes: 109 additions & 0 deletions spec/cassettes/vehicle-media_next_track.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

109 changes: 109 additions & 0 deletions spec/cassettes/vehicle-media_prev_fav.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c78212b

Please sign in to comment.