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
@@ -0,0 +1,128 @@
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 02:02:39 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
+ - 463d9f839e6eb7ccc712ec5001dfa135
41
+ X-Runtime:
42
+ - '0.358328'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"614ac96b9d291d2af3d7bfc92e2880474afc1a7aa1c49b6df693fb1b1237c60d","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 02:02:41 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 614ac96b9d291d2af3d7bfc92e2880474afc1a7aa1c49b6df693fb1b1237c60d
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 02:02:39 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
+ - '"f75b5f2e5ddca5f7c1bf938da14972f4"'
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ X-Request-Id:
81
+ - f339ad32393df7d7048686949238f54c
82
+ X-Runtime:
83
+ - '0.064041'
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":["13e0ae629c708af6","156102684b1be0dd"],"state":"online","remote_start_enabled":true,"calendar_enabled":true,"notifications_enabled":true}],"count":1}'
87
+ http_version:
88
+ recorded_at: Wed, 17 Dec 2014 02:02:41 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/trunk_open
92
+ body:
93
+ encoding: UTF-8
94
+ string: which_trunk=rear
95
+ headers:
96
+ Authorization:
97
+ - Bearer 614ac96b9d291d2af3d7bfc92e2880474afc1a7aa1c49b6df693fb1b1237c60d
98
+ response:
99
+ status:
100
+ code: 400
101
+ message: Bad Request
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 02:02:40 GMT
107
+ Content-Type:
108
+ - application/json; charset=utf-8
109
+ Content-Length:
110
+ - '66'
111
+ Connection:
112
+ - keep-alive
113
+ Status:
114
+ - 400 Bad Request
115
+ X-Ua-Compatible:
116
+ - IE=Edge,chrome=1
117
+ Cache-Control:
118
+ - no-cache
119
+ X-Request-Id:
120
+ - bc7fcff8043599002f0d44b1d3550681
121
+ X-Runtime:
122
+ - '0.013840'
123
+ body:
124
+ encoding: UTF-8
125
+ string: '{"response":null,"error":"invalid_command","error_description":""}'
126
+ http_version:
127
+ recorded_at: Wed, 17 Dec 2014 02:02:42 GMT
128
+ 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:58: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
+ - 364c03e28fd4b67781c902ad6f25e0ed
41
+ X-Runtime:
42
+ - '0.517522'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"f6f692b74fc8ffb4b31df7ae126fbc169e31860aafcb57f9393857f1f72e0b87","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 01:58:20 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 f6f692b74fc8ffb4b31df7ae126fbc169e31860aafcb57f9393857f1f72e0b87
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 01:58:19 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
+ - '"43fa46d8ef01858addb3fa8a8d54e93e"'
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ X-Request-Id:
81
+ - cd24c5ab71307fa2b3cad8efc2c2d5c5
82
+ X-Runtime:
83
+ - '0.074052'
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":["156102684b1be0dd","b1278e37b13e8df2"],"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:58:20 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/remote_start_drive
92
+ body:
93
+ encoding: UTF-8
94
+ string: password=<TESLA_PASS>
95
+ headers:
96
+ Authorization:
97
+ - Bearer f6f692b74fc8ffb4b31df7ae126fbc169e31860aafcb57f9393857f1f72e0b87
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 01:58:21 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
+ - c47f14d97844f5be6084dc1fedc56c98
123
+ X-Runtime:
124
+ - '2.171873'
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"response":{"reason":"","result":true}}'
128
+ http_version:
129
+ recorded_at: Wed, 17 Dec 2014 01:58:23 GMT
130
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,169 @@
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
+ Authorization:
11
+ - Bearer ad890005a62335f6330e91194985fc9338cbfaf4fd4e16323082d505a967f572
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Wed, 17 Dec 2014 01:32:40 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Transfer-Encoding:
24
+ - chunked
25
+ Connection:
26
+ - keep-alive
27
+ Status:
28
+ - 200 OK
29
+ Cache-Control:
30
+ - no-store
31
+ Pragma:
32
+ - no-cache
33
+ X-Ua-Compatible:
34
+ - IE=Edge,chrome=1
35
+ Etag:
36
+ - '"3feccc557a27daf69e3786a1943b714c"'
37
+ X-Request-Id:
38
+ - 75dc56cf7ccc55c2889cd05024b2acf8
39
+ X-Runtime:
40
+ - '0.394458'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"access_token":"0383e3ae4c7d8e14ba17af871cf5211c426ff7e1639bec095d27647f4d133c8b","token_type":"bearer","expires_in":7776000}'
44
+ http_version:
45
+ recorded_at: Wed, 17 Dec 2014 01:32:42 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://owner-api.teslamotors.com/api/1/vehicles
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ Authorization:
54
+ - Bearer 0383e3ae4c7d8e14ba17af871cf5211c426ff7e1639bec095d27647f4d133c8b
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ Server:
61
+ - nginx
62
+ Date:
63
+ - Wed, 17 Dec 2014 01:32:41 GMT
64
+ Content-Type:
65
+ - application/json; charset=utf-8
66
+ Content-Length:
67
+ - '446'
68
+ Connection:
69
+ - keep-alive
70
+ Status:
71
+ - 200 OK
72
+ X-Ua-Compatible:
73
+ - IE=Edge,chrome=1
74
+ Etag:
75
+ - '"c52908b8db9336f89e7a1602f3b2a458"'
76
+ Cache-Control:
77
+ - max-age=0, private, must-revalidate
78
+ X-Request-Id:
79
+ - 67676bef6a5449e4176955cf1d3e6880
80
+ X-Runtime:
81
+ - '0.099597'
82
+ body:
83
+ encoding: UTF-8
84
+ 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}'
85
+ http_version:
86
+ recorded_at: Wed, 17 Dec 2014 01:32:43 GMT
87
+ - request:
88
+ method: post
89
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/set_charge_limit
90
+ body:
91
+ encoding: UTF-8
92
+ string: percent=1
93
+ headers:
94
+ Authorization:
95
+ - Bearer 0383e3ae4c7d8e14ba17af871cf5211c426ff7e1639bec095d27647f4d133c8b
96
+ response:
97
+ status:
98
+ code: 200
99
+ message: OK
100
+ headers:
101
+ Server:
102
+ - nginx
103
+ Date:
104
+ - Wed, 17 Dec 2014 01:32:42 GMT
105
+ Content-Type:
106
+ - application/json; charset=utf-8
107
+ Content-Length:
108
+ - '40'
109
+ Connection:
110
+ - keep-alive
111
+ Status:
112
+ - 200 OK
113
+ X-Ua-Compatible:
114
+ - IE=Edge,chrome=1
115
+ Etag:
116
+ - '"f67eec105dd6522783a1f1bacc52723a"'
117
+ Cache-Control:
118
+ - max-age=0, private, must-revalidate
119
+ X-Request-Id:
120
+ - a828f318df037876b5ae5d35a92807ca
121
+ X-Runtime:
122
+ - '0.294849'
123
+ body:
124
+ encoding: UTF-8
125
+ string: '{"response":{"reason":"","result":true}}'
126
+ http_version:
127
+ recorded_at: Wed, 17 Dec 2014 01:32:44 GMT
128
+ - request:
129
+ method: get
130
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/data_request/charge_state
131
+ body:
132
+ encoding: US-ASCII
133
+ string: ''
134
+ headers:
135
+ Authorization:
136
+ - Bearer 0383e3ae4c7d8e14ba17af871cf5211c426ff7e1639bec095d27647f4d133c8b
137
+ response:
138
+ status:
139
+ code: 200
140
+ message: OK
141
+ headers:
142
+ Server:
143
+ - nginx
144
+ Date:
145
+ - Wed, 17 Dec 2014 01:32:43 GMT
146
+ Content-Type:
147
+ - application/json; charset=utf-8
148
+ Content-Length:
149
+ - '926'
150
+ Connection:
151
+ - keep-alive
152
+ Status:
153
+ - 200 OK
154
+ X-Ua-Compatible:
155
+ - IE=Edge,chrome=1
156
+ Etag:
157
+ - '"21829ac527d051a3b7c22e6a9e0aab6b"'
158
+ Cache-Control:
159
+ - max-age=0, private, must-revalidate
160
+ X-Request-Id:
161
+ - 488b90de366bc65dc5a79e21ae3b5d30
162
+ X-Runtime:
163
+ - '0.191142'
164
+ body:
165
+ encoding: UTF-8
166
+ string: '{"response":{"charging_state":"Stopped","charge_limit_soc":50,"charge_limit_soc_std":90,"charge_limit_soc_min":50,"charge_limit_soc_max":100,"charge_to_max_range":false,"battery_heater_on":null,"not_enough_power_to_heat":false,"max_range_charge_counter":0,"fast_charger_present":false,"fast_charger_type":"<invalid>","battery_range":195.84,"est_battery_range":140.72,"ideal_battery_range":221.71,"battery_level":78,"usable_battery_level":78,"battery_current":-0.1,"charge_energy_added":0.0,"charge_miles_added_rated":0.0,"charge_miles_added_ideal":0.0,"charger_voltage":0,"charger_pilot_current":40,"charger_actual_current":0,"charger_power":0,"time_to_full_charge":0.0,"charge_rate":0.0,"charge_port_door_open":true,"motorized_charge_port":false,"scheduled_charging_start_time":null,"scheduled_charging_pending":false,"user_charge_enable_request":false,"charge_enable_request":false,"eu_vehicle":false,"charger_phases":null}}'
167
+ http_version:
168
+ recorded_at: Wed, 17 Dec 2014 01:32:44 GMT
169
+ 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:32:35 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
+ - a37959a7b3594cb9f1a56dc605e0bcc4
41
+ X-Runtime:
42
+ - '0.410277'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"access_token":"62d3a001566ba9e334f93ef14c03bdf6d6cbee80aaa48b6a790f8eb00a8034e7","token_type":"bearer","expires_in":7776000}'
46
+ http_version:
47
+ recorded_at: Wed, 17 Dec 2014 01:32:36 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 62d3a001566ba9e334f93ef14c03bdf6d6cbee80aaa48b6a790f8eb00a8034e7
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Wed, 17 Dec 2014 01:32:35 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
+ - 5e1c692deda17a6d324a0c217ebe4196
82
+ X-Runtime:
83
+ - '0.160918'
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:32:37 GMT
89
+ - request:
90
+ method: post
91
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/set_charge_limit
92
+ body:
93
+ encoding: UTF-8
94
+ string: percent=100
95
+ headers:
96
+ Authorization:
97
+ - Bearer 62d3a001566ba9e334f93ef14c03bdf6d6cbee80aaa48b6a790f8eb00a8034e7
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Server:
104
+ - nginx
105
+ Date:
106
+ - Wed, 17 Dec 2014 01:32:36 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
+ - 82054b3b03a8456718c070ffeb884293
123
+ X-Runtime:
124
+ - '0.726342'
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"response":{"reason":"","result":true}}'
128
+ http_version:
129
+ recorded_at: Wed, 17 Dec 2014 01:32:38 GMT
130
+ recorded_with: VCR 2.9.3