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.
- 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 01:06:04 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 | 
            +
                  - d4d3206c0e5c38dfe3e8a8c05e353d3d
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.358326'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"3be1e79c3e7541a9ed1137b9baf719f3b07aab5966b49d7c42b004f1cb909005","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:06:06 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 3be1e79c3e7541a9ed1137b9baf719f3b07aab5966b49d7c42b004f1cb909005
         | 
| 57 | 
            +
              response:
         | 
| 58 | 
            +
                status:
         | 
| 59 | 
            +
                  code: 200
         | 
| 60 | 
            +
                  message: OK
         | 
| 61 | 
            +
                headers:
         | 
| 62 | 
            +
                  Server:
         | 
| 63 | 
            +
                  - nginx
         | 
| 64 | 
            +
                  Date:
         | 
| 65 | 
            +
                  - Wed, 17 Dec 2014 01:06:05 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 | 
            +
                  - b321242c88b0d31fc952ec46ca2816ab
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.457357'
         | 
| 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:06:07 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: post
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/door_lock
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: UTF-8
         | 
| 94 | 
            +
                  string: ''
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer 3be1e79c3e7541a9ed1137b9baf719f3b07aab5966b49d7c42b004f1cb909005
         | 
| 98 | 
            +
              response:
         | 
| 99 | 
            +
                status:
         | 
| 100 | 
            +
                  code: 200
         | 
| 101 | 
            +
                  message: OK
         | 
| 102 | 
            +
                headers:
         | 
| 103 | 
            +
                  Server:
         | 
| 104 | 
            +
                  - nginx
         | 
| 105 | 
            +
                  Date:
         | 
| 106 | 
            +
                  - Wed, 17 Dec 2014 01:06:06 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 | 
            +
                  - 6dc4f32386cfa0a6d3e8a6a06849572e
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '0.226051'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:06:07 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:06:00 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 | 
            +
                  - a8173dfef1131b5cec6e95f121264c3d
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.472700'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"421c74dc2b7b4705b57384a0c119b31eb08964b0029178b0f3b6a995855ac403","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:06:02 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 421c74dc2b7b4705b57384a0c119b31eb08964b0029178b0f3b6a995855ac403
         | 
| 57 | 
            +
              response:
         | 
| 58 | 
            +
                status:
         | 
| 59 | 
            +
                  code: 200
         | 
| 60 | 
            +
                  message: OK
         | 
| 61 | 
            +
                headers:
         | 
| 62 | 
            +
                  Server:
         | 
| 63 | 
            +
                  - nginx
         | 
| 64 | 
            +
                  Date:
         | 
| 65 | 
            +
                  - Wed, 17 Dec 2014 01:06: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 | 
            +
                  - '"900c699a9c4c6d36d87b1902a2fda748"'
         | 
| 78 | 
            +
                  Cache-Control:
         | 
| 79 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 80 | 
            +
                  X-Request-Id:
         | 
| 81 | 
            +
                  - 80cf21df47a20d4c5124ed6cf73f0480
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.061293'
         | 
| 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:06:02 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: post
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/door_unlock
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: UTF-8
         | 
| 94 | 
            +
                  string: ''
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer 421c74dc2b7b4705b57384a0c119b31eb08964b0029178b0f3b6a995855ac403
         | 
| 98 | 
            +
              response:
         | 
| 99 | 
            +
                status:
         | 
| 100 | 
            +
                  code: 200
         | 
| 101 | 
            +
                  message: OK
         | 
| 102 | 
            +
                headers:
         | 
| 103 | 
            +
                  Server:
         | 
| 104 | 
            +
                  - nginx
         | 
| 105 | 
            +
                  Date:
         | 
| 106 | 
            +
                  - Wed, 17 Dec 2014 01:06:01 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 | 
            +
                  - fe82543053049ea198a5b7ee40801898
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '0.226710'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:06:03 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:24:45 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 | 
            +
                  - 7789440195496bd4ab1e9e0382f08a9e
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.513641'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"6e2f693f734714a035fe2bf134755a08ba7368aaeb537757e0f98a854dffb03a","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 00:24:47 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 6e2f693f734714a035fe2bf134755a08ba7368aaeb537757e0f98a854dffb03a
         | 
| 57 | 
            +
              response:
         | 
| 58 | 
            +
                status:
         | 
| 59 | 
            +
                  code: 200
         | 
| 60 | 
            +
                  message: OK
         | 
| 61 | 
            +
                headers:
         | 
| 62 | 
            +
                  Server:
         | 
| 63 | 
            +
                  - nginx
         | 
| 64 | 
            +
                  Date:
         | 
| 65 | 
            +
                  - Wed, 17 Dec 2014 00:24:46 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 | 
            +
                  - 74df5cd8df77d54b837aee4336742a87
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.065578'
         | 
| 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:24:48 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: get
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/data_request/drive_state
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: US-ASCII
         | 
| 94 | 
            +
                  string: ''
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer 6e2f693f734714a035fe2bf134755a08ba7368aaeb537757e0f98a854dffb03a
         | 
| 98 | 
            +
              response:
         | 
| 99 | 
            +
                status:
         | 
| 100 | 
            +
                  code: 200
         | 
| 101 | 
            +
                  message: OK
         | 
| 102 | 
            +
                headers:
         | 
| 103 | 
            +
                  Server:
         | 
| 104 | 
            +
                  - nginx
         | 
| 105 | 
            +
                  Date:
         | 
| 106 | 
            +
                  - Wed, 17 Dec 2014 00:24:47 GMT
         | 
| 107 | 
            +
                  Content-Type:
         | 
| 108 | 
            +
                  - application/json; charset=utf-8
         | 
| 109 | 
            +
                  Content-Length:
         | 
| 110 | 
            +
                  - '126'
         | 
| 111 | 
            +
                  Connection:
         | 
| 112 | 
            +
                  - keep-alive
         | 
| 113 | 
            +
                  Status:
         | 
| 114 | 
            +
                  - 200 OK
         | 
| 115 | 
            +
                  X-Ua-Compatible:
         | 
| 116 | 
            +
                  - IE=Edge,chrome=1
         | 
| 117 | 
            +
                  Etag:
         | 
| 118 | 
            +
                  - '"43025cb12bc6d82f44c026be7c6f58a8"'
         | 
| 119 | 
            +
                  Cache-Control:
         | 
| 120 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 121 | 
            +
                  X-Request-Id:
         | 
| 122 | 
            +
                  - feb7ae451c4f4536e62242f96311add8
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '0.409616'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"shift_state":null,"speed":null,"latitude":33.794834,"longitude":-84.40159,"heading":360,"gps_as_of":1418775885}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 00:24:49 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:03 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 | 
            +
                  - bad57ec5aadb2cd79ff6a050d86eb9b5
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.347671'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"52a20c2f250a12541bf54fdbad7b7d530c9c16b7eab5a49a632ce4ff92dd49ca","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:05:05 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 52a20c2f250a12541bf54fdbad7b7d530c9c16b7eab5a49a632ce4ff92dd49ca
         | 
| 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:04 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 | 
            +
                  - 60cc8443cdeea606ea749a11254ac938
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.049626'
         | 
| 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:05 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: post
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/flash_lights
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: UTF-8
         | 
| 94 | 
            +
                  string: ''
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer 52a20c2f250a12541bf54fdbad7b7d530c9c16b7eab5a49a632ce4ff92dd49ca
         | 
| 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:06 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 | 
            +
                  - d02448114303e2bf64d186b9f07f6e23
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '1.747628'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:05:07 GMT
         | 
| 130 | 
            +
            recorded_with: VCR 2.9.3
         |