tesla_api 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -2
  3. data/lib/tesla_api/vehicle.rb +32 -20
  4. data/lib/tesla_api/version.rb +1 -1
  5. data/spec/cassettes/vehicle-auto_conditioning_start.yml +130 -0
  6. data/spec/cassettes/vehicle-auto_conditioning_stop.yml +130 -0
  7. data/spec/cassettes/vehicle-charge_max_range-twice.yml +171 -0
  8. data/spec/cassettes/vehicle-charge_max_range.yml +130 -0
  9. data/spec/cassettes/vehicle-charge_port_door_open.yml +130 -0
  10. data/spec/cassettes/vehicle-charge_standard-twice.yml +171 -0
  11. data/spec/cassettes/vehicle-charge_standard.yml +130 -0
  12. data/spec/cassettes/vehicle-charge_start.yml +130 -0
  13. data/spec/cassettes/vehicle-charge_state.yml +130 -0
  14. data/spec/cassettes/vehicle-charge_stop.yml +130 -0
  15. data/spec/cassettes/vehicle-climate_state.yml +130 -0
  16. data/spec/cassettes/vehicle-door_lock.yml +130 -0
  17. data/spec/cassettes/vehicle-door_unlock.yml +130 -0
  18. data/spec/cassettes/vehicle-drive_state.yml +130 -0
  19. data/spec/cassettes/vehicle-flash_lights.yml +130 -0
  20. data/spec/cassettes/vehicle-gui_settings.yml +130 -0
  21. data/spec/cassettes/vehicle-honk_horn.yml +130 -0
  22. data/spec/cassettes/vehicle-mobile_enabled.yml +130 -0
  23. data/spec/cassettes/vehicle-open_frunk.yml +128 -0
  24. data/spec/cassettes/vehicle-open_trunk.yml +128 -0
  25. data/spec/cassettes/vehicle-remove_start_drive.yml +130 -0
  26. data/spec/cassettes/vehicle-set_charge_limit-1.yml +169 -0
  27. data/spec/cassettes/vehicle-set_charge_limit-100.yml +130 -0
  28. data/spec/cassettes/vehicle-set_charge_limit-50.yml +128 -0
  29. data/spec/cassettes/vehicle-set_charge_limit-90.yml +128 -0
  30. data/spec/cassettes/vehicle-set_temps-70-70.yml +130 -0
  31. data/spec/cassettes/vehicle-set_temps-75-65.yml +130 -0
  32. data/spec/cassettes/vehicle-sun_roof_control-close.yml +130 -0
  33. data/spec/cassettes/vehicle-sun_roof_control-comfort.yml +130 -0
  34. data/spec/cassettes/vehicle-sun_roof_control-open.yml +130 -0
  35. data/spec/cassettes/vehicle-sun_roof_control-vent.yml +130 -0
  36. data/spec/cassettes/vehicle-sun_roof_move-0.yml +130 -0
  37. data/spec/cassettes/vehicle-sun_roof_move-100.yml +130 -0
  38. data/spec/cassettes/vehicle-sun_roof_move-50.yml +130 -0
  39. data/spec/cassettes/vehicle-vehicle_state.yml +130 -0
  40. data/spec/cassettes/vehicle-wake_up.yml +130 -0
  41. data/spec/lib/tesla_api/vehicle_spec.rb +228 -0
  42. data/spec/spec_helper.rb +12 -4
  43. data/tesla_api.gemspec +2 -0
  44. metadata +102 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7441f6abbbf1b45ba289dfa54e436ad1bf01afe
4
- data.tar.gz: c8924314065402e270be9a040d5b8b1b897a7814
3
+ metadata.gz: 004b8279c80ca07b37c054941a16a1d342e9542f
4
+ data.tar.gz: fd9ae6cdfafad753f98f6ce263dd8877ed520eaa
5
5
  SHA512:
6
- metadata.gz: 02e8ad2eae1b2579fb1ee71a96ddc312d7aab6161e4dd52e4c8c224004985a88afb91f6a7b83f942468de56264961746f8793872c9d2897b8dd10dc58668e2e9
7
- data.tar.gz: a7721fae02bcf38a700bf939c28501ae0c2b63c74e2e6856ec81dfc788e74d101662037aba80064d0d5b73fc6907539967f086797b574a3186c006e75625eba2
6
+ metadata.gz: 7f26680c9e17dfbb291f4bf8ccbe0a0ab33d7c8081a354d2d11eafde143c304ba30fac527daaf1880a1308bc92ca51b9641ca728c3d83a2240971bec12789046
7
+ data.tar.gz: 245de6504dd0690402da5d03aa0da0042a06d944abdb11e8e5cb934cf734b1a25a5f648f70c800771c9d3bc22e6b0a20203da52b9368fee3f29f31b9e7f2373f
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem 'coveralls', require: false
@@ -29,6 +29,10 @@ module TeslaApi
29
29
  api.get("/vehicles/#{id}/mobile_enabled")["response"]
30
30
  end
31
31
 
32
+ def gui_settings
33
+ api.get("/vehicles/#{id}/data_request/gui_settings")["response"]
34
+ end
35
+
32
36
  def charge_state
33
37
  api.get("/vehicles/#{id}/data_request/charge_state")["response"]
34
38
  end
@@ -41,10 +45,6 @@ module TeslaApi
41
45
  api.get("/vehicles/#{id}/data_request/drive_state")["response"]
42
46
  end
43
47
 
44
- def gui_settings
45
- api.get("/vehicles/#{id}/data_request/gui_settings")["response"]
46
- end
47
-
48
48
  def vehicle_state
49
49
  api.get("/vehicles/#{id}/data_request/vehicle_state")["response"]
50
50
  end
@@ -52,67 +52,79 @@ module TeslaApi
52
52
  # Commands
53
53
 
54
54
  def wake_up
55
- api.post("/vehicles/#{id}/wake_up")
55
+ @vehicle = api.post("/vehicles/#{id}/wake_up")["response"]
56
56
  end
57
57
 
58
58
  def charge_port_door_open
59
- api.post("/vehicles/#{id}/command/charge_port_door_open")
59
+ api.post("/vehicles/#{id}/command/charge_port_door_open")["response"]
60
60
  end
61
61
 
62
62
  def charge_standard
63
- api.post("/vehicles/#{id}/command/charge_standard")
63
+ api.post("/vehicles/#{id}/command/charge_standard")["response"]
64
64
  end
65
65
 
66
66
  def charge_max_range
67
- api.post("/vehicles/#{id}/command/charge_max_range")
67
+ api.post("/vehicles/#{id}/command/charge_max_range")["response"]
68
68
  end
69
69
 
70
70
  def set_charge_limit(percent)
71
- api.post("/vehicles/#{id}/command/set_charge_limit", query: {state: "set", percent: percent})
71
+ api.post("/vehicles/#{id}/command/set_charge_limit", body: {percent: percent})["response"]
72
72
  end
73
73
 
74
74
  def charge_start
75
- api.post("/vehicles/#{id}/command/charge_start")
75
+ api.post("/vehicles/#{id}/command/charge_start")["response"]
76
76
  end
77
77
 
78
78
  def charge_stop
79
- api.post("/vehicles/#{id}/command/charge_stop")
79
+ api.post("/vehicles/#{id}/command/charge_stop")["response"]
80
80
  end
81
81
 
82
82
  def flash_lights
83
- api.post("/vehicles/#{id}/command/flash_lights")
83
+ api.post("/vehicles/#{id}/command/flash_lights")["response"]
84
84
  end
85
85
 
86
86
  def honk_horn
87
- api.post("/vehicles/#{id}/command/honk_horn")
87
+ api.post("/vehicles/#{id}/command/honk_horn")["response"]
88
88
  end
89
89
 
90
90
  def door_unlock
91
- api.post("/vehicles/#{id}/command/door_unlock")
91
+ api.post("/vehicles/#{id}/command/door_unlock")["response"]
92
92
  end
93
93
 
94
94
  def door_lock
95
- api.post("/vehicles/#{id}/command/door_lock")
95
+ api.post("/vehicles/#{id}/command/door_lock")["response"]
96
96
  end
97
97
 
98
98
  def set_temps(driver_temp, passenger_temp)
99
- api.post("/vehicles/#{id}/command/set_temps", query: {driver_temp: driver_temp, passenger_temp: passenger_temp})
99
+ api.post("/vehicles/#{id}/command/set_temps", body: {driver_temp: driver_temp, passenger_temp: passenger_temp})["response"]
100
100
  end
101
101
 
102
102
  def auto_conditioning_start
103
- api.post("/vehicles/#{id}/command/auto_conditioning_start")
103
+ api.post("/vehicles/#{id}/command/auto_conditioning_start")["response"]
104
104
  end
105
105
 
106
106
  def auto_conditioning_stop
107
- api.post("/vehicles/#{id}/command/auto_conditioning_stop")
107
+ api.post("/vehicles/#{id}/command/auto_conditioning_stop")["response"]
108
108
  end
109
109
 
110
110
  def sun_roof_control(state)
111
- api.post("/vehicles/#{id}/command/sun_roof_control", query: {state: state})
111
+ api.post("/vehicles/#{id}/command/sun_roof_control", body: {state: state})["response"]
112
112
  end
113
113
 
114
114
  def sun_roof_move(percent)
115
- api.post("/vehicles/#{id}/command/sun_roof_control", query: {state: "move", percent: percent})
115
+ api.post("/vehicles/#{id}/command/sun_roof_control", body: {state: "move", percent: percent})["response"]
116
+ end
117
+
118
+ def remove_start_drive(password)
119
+ api.post("/vehicles/#{id}/command/remote_start_drive", body: {password: password})["response"]
120
+ end
121
+
122
+ def open_trunk
123
+ api.post("/vehicles/#{id}/command/trunk_open", body: {which_trunk: "rear"})
124
+ end
125
+
126
+ def open_frunk
127
+ api.post("/vehicles/#{id}/command/trunk_open", body: {which_trunk: "rear"})
116
128
  end
117
129
 
118
130
  # Streaming
@@ -1,3 +1,3 @@
1
1
  module TeslaApi
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,130 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://owner-api.teslamotors.com/oauth/token
6
+ body:
7
+ encoding: UTF-8
8
+ string: grant_type=password&client_id=<TESLA_CLIENT_ID>&client_secret=<TESLA_CLIENT_SECRET>&email=<TESLA_EMAIL>&password=<TESLA_PASS>
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 17 Dec 2014 01:33:41 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 200 OK
33
+ Cache-Control:
34
+ - no-store
35
+ Pragma:
36
+ - no-cache
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ X-Request-Id:
40
+ - c31149ebc7a02e58d94888f526dca0d8
41
+ X-Runtime:
42
+ - '0.473320'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"41ed8ed293b2e0395bf66b01defa47a1790aed0c2d90bda4e0dd40ff30179a04","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 01:33:43 GMT
48
+ - request:
49
+ method: get
50
+ uri: https://owner-api.teslamotors.com/api/1/vehicles
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ Authorization:
56
+ - Bearer 41ed8ed293b2e0395bf66b01defa47a1790aed0c2d90bda4e0dd40ff30179a04
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 01:33:42 GMT
66
+ Content-Type:
67
+ - application/json; charset=utf-8
68
+ Content-Length:
69
+ - '446'
70
+ Connection:
71
+ - keep-alive
72
+ Status:
73
+ - 200 OK
74
+ X-Ua-Compatible:
75
+ - IE=Edge,chrome=1
76
+ Etag:
77
+ - '"c52908b8db9336f89e7a1602f3b2a458"'
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ X-Request-Id:
81
+ - a5a3c0ba87ff5ed57d362aad496385eb
82
+ X-Runtime:
83
+ - '0.172755'
84
+ body:
85
+ encoding: UTF-8
86
+ string: '{"response":[{"color":null,"display_name":"Nikola","id":1514029006966957156,"option_codes":"MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013,COUS","vehicle_id":490215852,"vin":"5YJSA1CN5CFP01657","tokens":["b1278e37b13e8df2","b2fd1ad42f706a73"],"state":"online","remote_start_enabled":true,"calendar_enabled":true,"notifications_enabled":true}],"count":1}'
87
+ http_version:
88
+ recorded_at: Wed, 17 Dec 2014 01:33:43 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/auto_conditioning_start
92
+ body:
93
+ encoding: UTF-8
94
+ string: ''
95
+ headers:
96
+ Authorization:
97
+ - Bearer 41ed8ed293b2e0395bf66b01defa47a1790aed0c2d90bda4e0dd40ff30179a04
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 01:33:43 GMT
107
+ Content-Type:
108
+ - application/json; charset=utf-8
109
+ Content-Length:
110
+ - '40'
111
+ Connection:
112
+ - keep-alive
113
+ Status:
114
+ - 200 OK
115
+ X-Ua-Compatible:
116
+ - IE=Edge,chrome=1
117
+ Etag:
118
+ - '"f67eec105dd6522783a1f1bacc52723a"'
119
+ Cache-Control:
120
+ - max-age=0, private, must-revalidate
121
+ X-Request-Id:
122
+ - 6cf21f267374ed099b71ab979bfd1e10
123
+ X-Runtime:
124
+ - '1.191736'
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"response":{"reason":"","result":true}}'
128
+ http_version:
129
+ recorded_at: Wed, 17 Dec 2014 01:33:45 GMT
130
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,130 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://owner-api.teslamotors.com/oauth/token
6
+ body:
7
+ encoding: UTF-8
8
+ string: grant_type=password&client_id=<TESLA_CLIENT_ID>&client_secret=<TESLA_CLIENT_SECRET>&email=<TESLA_EMAIL>&password=<TESLA_PASS>
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 17 Dec 2014 01:34:18 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 200 OK
33
+ Cache-Control:
34
+ - no-store
35
+ Pragma:
36
+ - no-cache
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ X-Request-Id:
40
+ - db0fbf30042251a5b7b3bf1d491ab307
41
+ X-Runtime:
42
+ - '0.602222'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"ba268ba8e0726ad1776918965e54235a5ce2cc569910756bc07fec91b1702ffd","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 01:34:19 GMT
48
+ - request:
49
+ method: get
50
+ uri: https://owner-api.teslamotors.com/api/1/vehicles
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ Authorization:
56
+ - Bearer ba268ba8e0726ad1776918965e54235a5ce2cc569910756bc07fec91b1702ffd
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 01:34:18 GMT
66
+ Content-Type:
67
+ - application/json; charset=utf-8
68
+ Content-Length:
69
+ - '446'
70
+ Connection:
71
+ - keep-alive
72
+ Status:
73
+ - 200 OK
74
+ X-Ua-Compatible:
75
+ - IE=Edge,chrome=1
76
+ Etag:
77
+ - '"c52908b8db9336f89e7a1602f3b2a458"'
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ X-Request-Id:
81
+ - 64c473cf9e85a63c43278b19e1d38789
82
+ X-Runtime:
83
+ - '0.051722'
84
+ body:
85
+ encoding: UTF-8
86
+ string: '{"response":[{"color":null,"display_name":"Nikola","id":1514029006966957156,"option_codes":"MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013,COUS","vehicle_id":490215852,"vin":"5YJSA1CN5CFP01657","tokens":["b1278e37b13e8df2","b2fd1ad42f706a73"],"state":"online","remote_start_enabled":true,"calendar_enabled":true,"notifications_enabled":true}],"count":1}'
87
+ http_version:
88
+ recorded_at: Wed, 17 Dec 2014 01:34:20 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/auto_conditioning_stop
92
+ body:
93
+ encoding: UTF-8
94
+ string: ''
95
+ headers:
96
+ Authorization:
97
+ - Bearer ba268ba8e0726ad1776918965e54235a5ce2cc569910756bc07fec91b1702ffd
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 01:34:19 GMT
107
+ Content-Type:
108
+ - application/json; charset=utf-8
109
+ Content-Length:
110
+ - '40'
111
+ Connection:
112
+ - keep-alive
113
+ Status:
114
+ - 200 OK
115
+ X-Ua-Compatible:
116
+ - IE=Edge,chrome=1
117
+ Etag:
118
+ - '"f67eec105dd6522783a1f1bacc52723a"'
119
+ Cache-Control:
120
+ - max-age=0, private, must-revalidate
121
+ X-Request-Id:
122
+ - 2a0bbf78f050ad15967dcd68d73d81c6
123
+ X-Runtime:
124
+ - '0.227709'
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"response":{"reason":"","result":true}}'
128
+ http_version:
129
+ recorded_at: Wed, 17 Dec 2014 01:34:21 GMT
130
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,171 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://owner-api.teslamotors.com/oauth/token
6
+ body:
7
+ encoding: UTF-8
8
+ string: grant_type=password&client_id=<TESLA_CLIENT_ID>&client_secret=<TESLA_CLIENT_SECRET>&email=<TESLA_EMAIL>&password=<TESLA_PASS>
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 17 Dec 2014 00:54:53 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 200 OK
33
+ Cache-Control:
34
+ - no-store
35
+ Pragma:
36
+ - no-cache
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ X-Request-Id:
40
+ - c66049a15037753de12a2231454d5628
41
+ X-Runtime:
42
+ - '0.448150'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"55c9d541197447b2b1b341c66a3b31f08b4377e0d20fe57fe2fe9f1dd4381fb0","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 00:54:55 GMT
48
+ - request:
49
+ method: get
50
+ uri: https://owner-api.teslamotors.com/api/1/vehicles
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ Authorization:
56
+ - Bearer 55c9d541197447b2b1b341c66a3b31f08b4377e0d20fe57fe2fe9f1dd4381fb0
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 00:54:54 GMT
66
+ Content-Type:
67
+ - application/json; charset=utf-8
68
+ Content-Length:
69
+ - '446'
70
+ Connection:
71
+ - keep-alive
72
+ Status:
73
+ - 200 OK
74
+ X-Ua-Compatible:
75
+ - IE=Edge,chrome=1
76
+ Etag:
77
+ - '"92bf165299826af7b9ed0b8f3886e15e"'
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ X-Request-Id:
81
+ - 0cffcad0c9bcbe347219df03af20d4d1
82
+ X-Runtime:
83
+ - '0.055126'
84
+ body:
85
+ encoding: UTF-8
86
+ string: '{"response":[{"color":null,"display_name":"Nikola","id":1514029006966957156,"option_codes":"MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013,COUS","vehicle_id":490215852,"vin":"5YJSA1CN5CFP01657","tokens":["91a139ce322eed65","493cead2e5ab6535"],"state":"online","remote_start_enabled":true,"calendar_enabled":true,"notifications_enabled":true}],"count":1}'
87
+ http_version:
88
+ recorded_at: Wed, 17 Dec 2014 00:54:56 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/charge_max_range
92
+ body:
93
+ encoding: UTF-8
94
+ string: ''
95
+ headers:
96
+ Authorization:
97
+ - Bearer 55c9d541197447b2b1b341c66a3b31f08b4377e0d20fe57fe2fe9f1dd4381fb0
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 00:54:55 GMT
107
+ Content-Type:
108
+ - application/json; charset=utf-8
109
+ Content-Length:
110
+ - '40'
111
+ Connection:
112
+ - keep-alive
113
+ Status:
114
+ - 200 OK
115
+ X-Ua-Compatible:
116
+ - IE=Edge,chrome=1
117
+ Etag:
118
+ - '"f67eec105dd6522783a1f1bacc52723a"'
119
+ Cache-Control:
120
+ - max-age=0, private, must-revalidate
121
+ X-Request-Id:
122
+ - 6469582a38daf1a77d1eab48ef6ad132
123
+ X-Runtime:
124
+ - '0.792509'
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"response":{"reason":"","result":true}}'
128
+ http_version:
129
+ recorded_at: Wed, 17 Dec 2014 00:54:57 GMT
130
+ - request:
131
+ method: post
132
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/charge_max_range
133
+ body:
134
+ encoding: UTF-8
135
+ string: ''
136
+ headers:
137
+ Authorization:
138
+ - Bearer 55c9d541197447b2b1b341c66a3b31f08b4377e0d20fe57fe2fe9f1dd4381fb0
139
+ response:
140
+ status:
141
+ code: 200
142
+ message: OK
143
+ headers:
144
+ Server:
145
+ - nginx
146
+ Date:
147
+ - Wed, 17 Dec 2014 00:54:56 GMT
148
+ Content-Type:
149
+ - application/json; charset=utf-8
150
+ Content-Length:
151
+ - '58'
152
+ Connection:
153
+ - keep-alive
154
+ Status:
155
+ - 200 OK
156
+ X-Ua-Compatible:
157
+ - IE=Edge,chrome=1
158
+ Etag:
159
+ - '"166ceb8e24f75b4a416e51ce669070f3"'
160
+ Cache-Control:
161
+ - max-age=0, private, must-revalidate
162
+ X-Request-Id:
163
+ - f8db727016811e7014b072e73fff30ea
164
+ X-Runtime:
165
+ - '0.229436'
166
+ body:
167
+ encoding: UTF-8
168
+ string: '{"response":{"reason":"already_max_range","result":false}}'
169
+ http_version:
170
+ recorded_at: Wed, 17 Dec 2014 00:54:58 GMT
171
+ recorded_with: VCR 2.9.3