tesla_api 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/lib/tesla_api/vehicle.rb +32 -20
- data/lib/tesla_api/version.rb +1 -1
- data/spec/cassettes/vehicle-auto_conditioning_start.yml +130 -0
- data/spec/cassettes/vehicle-auto_conditioning_stop.yml +130 -0
- data/spec/cassettes/vehicle-charge_max_range-twice.yml +171 -0
- data/spec/cassettes/vehicle-charge_max_range.yml +130 -0
- data/spec/cassettes/vehicle-charge_port_door_open.yml +130 -0
- data/spec/cassettes/vehicle-charge_standard-twice.yml +171 -0
- data/spec/cassettes/vehicle-charge_standard.yml +130 -0
- data/spec/cassettes/vehicle-charge_start.yml +130 -0
- data/spec/cassettes/vehicle-charge_state.yml +130 -0
- data/spec/cassettes/vehicle-charge_stop.yml +130 -0
- data/spec/cassettes/vehicle-climate_state.yml +130 -0
- data/spec/cassettes/vehicle-door_lock.yml +130 -0
- data/spec/cassettes/vehicle-door_unlock.yml +130 -0
- data/spec/cassettes/vehicle-drive_state.yml +130 -0
- data/spec/cassettes/vehicle-flash_lights.yml +130 -0
- data/spec/cassettes/vehicle-gui_settings.yml +130 -0
- data/spec/cassettes/vehicle-honk_horn.yml +130 -0
- data/spec/cassettes/vehicle-mobile_enabled.yml +130 -0
- data/spec/cassettes/vehicle-open_frunk.yml +128 -0
- data/spec/cassettes/vehicle-open_trunk.yml +128 -0
- data/spec/cassettes/vehicle-remove_start_drive.yml +130 -0
- data/spec/cassettes/vehicle-set_charge_limit-1.yml +169 -0
- data/spec/cassettes/vehicle-set_charge_limit-100.yml +130 -0
- data/spec/cassettes/vehicle-set_charge_limit-50.yml +128 -0
- data/spec/cassettes/vehicle-set_charge_limit-90.yml +128 -0
- data/spec/cassettes/vehicle-set_temps-70-70.yml +130 -0
- data/spec/cassettes/vehicle-set_temps-75-65.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_control-close.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_control-comfort.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_control-open.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_control-vent.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_move-0.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_move-100.yml +130 -0
- data/spec/cassettes/vehicle-sun_roof_move-50.yml +130 -0
- data/spec/cassettes/vehicle-vehicle_state.yml +130 -0
- data/spec/cassettes/vehicle-wake_up.yml +130 -0
- data/spec/lib/tesla_api/vehicle_spec.rb +228 -0
- data/spec/spec_helper.rb +12 -4
- data/tesla_api.gemspec +2 -0
- metadata +102 -2
@@ -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 00:28:01 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
|
+
- 7d9a2c5763b750fb7b416a7671bc1676
|
41
|
+
X-Runtime:
|
42
|
+
- '0.507313'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"access_token":"5f423fa2d3c1886006c801d9e3a14388f8f196cdab2b503af7dba983a2d4c796","token_type":"bearer","expires_in":7776000}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 17 Dec 2014 00:28:03 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 5f423fa2d3c1886006c801d9e3a14388f8f196cdab2b503af7dba983a2d4c796
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx
|
64
|
+
Date:
|
65
|
+
- Wed, 17 Dec 2014 00:28:01 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
|
+
- '"c5d083718f906b7336fb8b28fcc87b6c"'
|
78
|
+
Cache-Control:
|
79
|
+
- max-age=0, private, must-revalidate
|
80
|
+
X-Request-Id:
|
81
|
+
- 2ceef794128248e70e7ae3a78d1213f4
|
82
|
+
X-Runtime:
|
83
|
+
- '0.078230'
|
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":["6b6e59059375f282","09b1673648be8c08"],"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:28:03 GMT
|
89
|
+
- request:
|
90
|
+
method: get
|
91
|
+
uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/data_request/gui_settings
|
92
|
+
body:
|
93
|
+
encoding: US-ASCII
|
94
|
+
string: ''
|
95
|
+
headers:
|
96
|
+
Authorization:
|
97
|
+
- Bearer 5f423fa2d3c1886006c801d9e3a14388f8f196cdab2b503af7dba983a2d4c796
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Server:
|
104
|
+
- nginx
|
105
|
+
Date:
|
106
|
+
- Wed, 17 Dec 2014 00:28:02 GMT
|
107
|
+
Content-Type:
|
108
|
+
- application/json; charset=utf-8
|
109
|
+
Content-Length:
|
110
|
+
- '156'
|
111
|
+
Connection:
|
112
|
+
- keep-alive
|
113
|
+
Status:
|
114
|
+
- 200 OK
|
115
|
+
X-Ua-Compatible:
|
116
|
+
- IE=Edge,chrome=1
|
117
|
+
Etag:
|
118
|
+
- '"244167fd8d1d060ffabae9da87cac508"'
|
119
|
+
Cache-Control:
|
120
|
+
- max-age=0, private, must-revalidate
|
121
|
+
X-Request-Id:
|
122
|
+
- 950c8b8571324a2a1f8f1c6f1f39d906
|
123
|
+
X-Runtime:
|
124
|
+
- '0.209955'
|
125
|
+
body:
|
126
|
+
encoding: UTF-8
|
127
|
+
string: '{"response":{"gui_distance_units":"mi/hr","gui_temperature_units":"F","gui_charge_rate_units":"mi/hr","gui_24_hour_time":false,"gui_range_display":"Rated"}}'
|
128
|
+
http_version:
|
129
|
+
recorded_at: Wed, 17 Dec 2014 00:28:04 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:05:07 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
|
+
- bb65d486b56a612518f45b5388de80ab
|
41
|
+
X-Runtime:
|
42
|
+
- '0.533290'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"access_token":"98d5ac94ea3ea2cd7eb27694d1d2575af599ef2fe823607ba316d157eebd2c8d","token_type":"bearer","expires_in":7776000}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 17 Dec 2014 01:05:09 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 98d5ac94ea3ea2cd7eb27694d1d2575af599ef2fe823607ba316d157eebd2c8d
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx
|
64
|
+
Date:
|
65
|
+
- Wed, 17 Dec 2014 01:05:08 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
|
+
- '"900c699a9c4c6d36d87b1902a2fda748"'
|
78
|
+
Cache-Control:
|
79
|
+
- max-age=0, private, must-revalidate
|
80
|
+
X-Request-Id:
|
81
|
+
- 25392b92f4c74e168ba4274fd7f96ba8
|
82
|
+
X-Runtime:
|
83
|
+
- '0.057493'
|
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":["a1f3fab6393d3a6a","91a139ce322eed65"],"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:05:09 GMT
|
89
|
+
- request:
|
90
|
+
method: post
|
91
|
+
uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/honk_horn
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: ''
|
95
|
+
headers:
|
96
|
+
Authorization:
|
97
|
+
- Bearer 98d5ac94ea3ea2cd7eb27694d1d2575af599ef2fe823607ba316d157eebd2c8d
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Server:
|
104
|
+
- nginx
|
105
|
+
Date:
|
106
|
+
- Wed, 17 Dec 2014 01:05:08 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
|
+
- 6ea606a5f197f644fc810917f862c63a
|
123
|
+
X-Runtime:
|
124
|
+
- '0.315469'
|
125
|
+
body:
|
126
|
+
encoding: UTF-8
|
127
|
+
string: '{"response":{"reason":"","result":true}}'
|
128
|
+
http_version:
|
129
|
+
recorded_at: Wed, 17 Dec 2014 01:05:10 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 00:16:43 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
|
+
- 7db3115ac739350f5fdd0c45fd1e46ed
|
41
|
+
X-Runtime:
|
42
|
+
- '0.494930'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"access_token":"7b266a228263ec2bbe821b6de916437bcaaf251a6b282ed6b8026670f85aec12","token_type":"bearer","expires_in":7776000}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 17 Dec 2014 00:16:45 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 7b266a228263ec2bbe821b6de916437bcaaf251a6b282ed6b8026670f85aec12
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx
|
64
|
+
Date:
|
65
|
+
- Wed, 17 Dec 2014 00:16:47 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
|
+
- '"c5d083718f906b7336fb8b28fcc87b6c"'
|
78
|
+
Cache-Control:
|
79
|
+
- max-age=0, private, must-revalidate
|
80
|
+
X-Request-Id:
|
81
|
+
- 764f037a10ac8d13c2c4c2f17bb01065
|
82
|
+
X-Runtime:
|
83
|
+
- '2.909714'
|
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":["6b6e59059375f282","09b1673648be8c08"],"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:16:49 GMT
|
89
|
+
- request:
|
90
|
+
method: get
|
91
|
+
uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/mobile_enabled
|
92
|
+
body:
|
93
|
+
encoding: US-ASCII
|
94
|
+
string: ''
|
95
|
+
headers:
|
96
|
+
Authorization:
|
97
|
+
- Bearer 7b266a228263ec2bbe821b6de916437bcaaf251a6b282ed6b8026670f85aec12
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Server:
|
104
|
+
- nginx
|
105
|
+
Date:
|
106
|
+
- Wed, 17 Dec 2014 00:16:51 GMT
|
107
|
+
Content-Type:
|
108
|
+
- application/json; charset=utf-8
|
109
|
+
Content-Length:
|
110
|
+
- '17'
|
111
|
+
Connection:
|
112
|
+
- keep-alive
|
113
|
+
Status:
|
114
|
+
- 200 OK
|
115
|
+
X-Ua-Compatible:
|
116
|
+
- IE=Edge,chrome=1
|
117
|
+
Etag:
|
118
|
+
- '"0bd75264337702d501fe87ce0b52dc08"'
|
119
|
+
Cache-Control:
|
120
|
+
- max-age=0, private, must-revalidate
|
121
|
+
X-Request-Id:
|
122
|
+
- e2fba5c75d503a78f5abf05fccadf74b
|
123
|
+
X-Runtime:
|
124
|
+
- '3.193111'
|
125
|
+
body:
|
126
|
+
encoding: UTF-8
|
127
|
+
string: '{"response":true}'
|
128
|
+
http_version:
|
129
|
+
recorded_at: Wed, 17 Dec 2014 00:16:53 GMT
|
130
|
+
recorded_with: VCR 2.9.3
|
@@ -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:01:59 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
|
+
- 67e09975b14c0b397198660437868653
|
41
|
+
X-Runtime:
|
42
|
+
- '0.520108'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"access_token":"a3bce92ff51163fa6072f435e88b4e9de61c79bafdfbae5867fb1157b00a64c5","token_type":"bearer","expires_in":7776000}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 17 Dec 2014 02:02:01 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 a3bce92ff51163fa6072f435e88b4e9de61c79bafdfbae5867fb1157b00a64c5
|
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:00 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
|
+
- 111bf3a7502b70e8416a6deea81f8ceb
|
82
|
+
X-Runtime:
|
83
|
+
- '0.078300'
|
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:02 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 a3bce92ff51163fa6072f435e88b4e9de61c79bafdfbae5867fb1157b00a64c5
|
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:00 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
|
+
- 61620ab4282664be50850b5f455d85e4
|
121
|
+
X-Runtime:
|
122
|
+
- '0.011449'
|
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:02 GMT
|
128
|
+
recorded_with: VCR 2.9.3
|