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,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 | 
            +
                  Authorization:
         | 
| 11 | 
            +
                  - Bearer 62d3a001566ba9e334f93ef14c03bdf6d6cbee80aaa48b6a790f8eb00a8034e7
         | 
| 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:37 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 | 
            +
                  - '"dfc073e1732fc7adbaf98d23e01e2659"'
         | 
| 37 | 
            +
                  X-Request-Id:
         | 
| 38 | 
            +
                  - 2365e6b62e4bc50faa9cc3d3aa68520e
         | 
| 39 | 
            +
                  X-Runtime:
         | 
| 40 | 
            +
                  - '0.460473'
         | 
| 41 | 
            +
                body:
         | 
| 42 | 
            +
                  encoding: UTF-8
         | 
| 43 | 
            +
                  string: '{"access_token":"ad890005a62335f6330e91194985fc9338cbfaf4fd4e16323082d505a967f572","token_type":"bearer","expires_in":7776000}'
         | 
| 44 | 
            +
                http_version: 
         | 
| 45 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:32:40 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 ad890005a62335f6330e91194985fc9338cbfaf4fd4e16323082d505a967f572
         | 
| 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:39 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 | 
            +
                  - 87980b26c56ec1a12eeb8b76903fa78b
         | 
| 80 | 
            +
                  X-Runtime:
         | 
| 81 | 
            +
                  - '0.124812'
         | 
| 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:41 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=50
         | 
| 93 | 
            +
                headers:
         | 
| 94 | 
            +
                  Authorization:
         | 
| 95 | 
            +
                  - Bearer ad890005a62335f6330e91194985fc9338cbfaf4fd4e16323082d505a967f572
         | 
| 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:40 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 | 
            +
                  - 65a8a476e70b2c86b71aceaca9e34c50
         | 
| 121 | 
            +
                  X-Runtime:
         | 
| 122 | 
            +
                  - '0.196873'
         | 
| 123 | 
            +
                body:
         | 
| 124 | 
            +
                  encoding: UTF-8
         | 
| 125 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 126 | 
            +
                http_version: 
         | 
| 127 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:32:41 GMT
         | 
| 128 | 
            +
            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 | 
            +
                  Authorization:
         | 
| 11 | 
            +
                  - Bearer 0383e3ae4c7d8e14ba17af871cf5211c426ff7e1639bec095d27647f4d133c8b
         | 
| 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:44 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 | 
            +
                  - '"aa85933c70f2c3fbd6acd6fc978ffe2f"'
         | 
| 37 | 
            +
                  X-Request-Id:
         | 
| 38 | 
            +
                  - 81a88ba10d3139af32494e4580eb5c5b
         | 
| 39 | 
            +
                  X-Runtime:
         | 
| 40 | 
            +
                  - '0.792461'
         | 
| 41 | 
            +
                body:
         | 
| 42 | 
            +
                  encoding: UTF-8
         | 
| 43 | 
            +
                  string: '{"access_token":"856adf41e24657ade01c2c9b6b3ea7eb7eeca4fa4c48e56e10649ed90603bea4","token_type":"bearer","expires_in":7776000}'
         | 
| 44 | 
            +
                http_version: 
         | 
| 45 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:32:46 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 856adf41e24657ade01c2c9b6b3ea7eb7eeca4fa4c48e56e10649ed90603bea4
         | 
| 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:44 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 | 
            +
                  - 881d67d19f4d44dfd5d7d2fc0b5a2753
         | 
| 80 | 
            +
                  X-Runtime:
         | 
| 81 | 
            +
                  - '0.046586'
         | 
| 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:46 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=90
         | 
| 93 | 
            +
                headers:
         | 
| 94 | 
            +
                  Authorization:
         | 
| 95 | 
            +
                  - Bearer 856adf41e24657ade01c2c9b6b3ea7eb7eeca4fa4c48e56e10649ed90603bea4
         | 
| 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:45 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 | 
            +
                  - 7c928b8b7c18fa848360a8391ce78795
         | 
| 121 | 
            +
                  X-Runtime:
         | 
| 122 | 
            +
                  - '0.240470'
         | 
| 123 | 
            +
                body:
         | 
| 124 | 
            +
                  encoding: UTF-8
         | 
| 125 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 126 | 
            +
                http_version: 
         | 
| 127 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:32:47 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:30: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 | 
            +
                  - 6a2eadbbbf303f8ac4cbc086afcb05e0
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.377642'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"a931e1caa3a8f157055c4d340542639decb4bebf84a27f9ec00e5d5f098efbde","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:30: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 a931e1caa3a8f157055c4d340542639decb4bebf84a27f9ec00e5d5f098efbde
         | 
| 57 | 
            +
              response:
         | 
| 58 | 
            +
                status:
         | 
| 59 | 
            +
                  code: 200
         | 
| 60 | 
            +
                  message: OK
         | 
| 61 | 
            +
                headers:
         | 
| 62 | 
            +
                  Server:
         | 
| 63 | 
            +
                  - nginx
         | 
| 64 | 
            +
                  Date:
         | 
| 65 | 
            +
                  - Wed, 17 Dec 2014 01:30: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 | 
            +
                  - '"c52908b8db9336f89e7a1602f3b2a458"'
         | 
| 78 | 
            +
                  Cache-Control:
         | 
| 79 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 80 | 
            +
                  X-Request-Id:
         | 
| 81 | 
            +
                  - e2429012d3631b3caa1ef3e3389a92b8
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.076449'
         | 
| 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:30:05 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: post
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/set_temps
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: UTF-8
         | 
| 94 | 
            +
                  string: driver_temp=20.9&passenger_temp=20.9
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer a931e1caa3a8f157055c4d340542639decb4bebf84a27f9ec00e5d5f098efbde
         | 
| 98 | 
            +
              response:
         | 
| 99 | 
            +
                status:
         | 
| 100 | 
            +
                  code: 200
         | 
| 101 | 
            +
                  message: OK
         | 
| 102 | 
            +
                headers:
         | 
| 103 | 
            +
                  Server:
         | 
| 104 | 
            +
                  - nginx
         | 
| 105 | 
            +
                  Date:
         | 
| 106 | 
            +
                  - Wed, 17 Dec 2014 01:30:05 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 | 
            +
                  - a9b7d7e1bb2152e65fa31090fc5d44dc
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '1.161746'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:30: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:28:12 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 | 
            +
                  - acf20952aa583cef4d1225bc84e65f20
         | 
| 41 | 
            +
                  X-Runtime:
         | 
| 42 | 
            +
                  - '0.426932'
         | 
| 43 | 
            +
                body:
         | 
| 44 | 
            +
                  encoding: UTF-8
         | 
| 45 | 
            +
                  string: '{"access_token":"f513f3cc8873c7cfc3e670c6300490fb151cc716195c37c0730da431013f59e8","token_type":"bearer","expires_in":7776000}'
         | 
| 46 | 
            +
                http_version: 
         | 
| 47 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:28:14 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 f513f3cc8873c7cfc3e670c6300490fb151cc716195c37c0730da431013f59e8
         | 
| 57 | 
            +
              response:
         | 
| 58 | 
            +
                status:
         | 
| 59 | 
            +
                  code: 200
         | 
| 60 | 
            +
                  message: OK
         | 
| 61 | 
            +
                headers:
         | 
| 62 | 
            +
                  Server:
         | 
| 63 | 
            +
                  - nginx
         | 
| 64 | 
            +
                  Date:
         | 
| 65 | 
            +
                  - Wed, 17 Dec 2014 01:28:13 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 | 
            +
                  - '"8c9a0113b7b759035c754c20a58116bc"'
         | 
| 78 | 
            +
                  Cache-Control:
         | 
| 79 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 80 | 
            +
                  X-Request-Id:
         | 
| 81 | 
            +
                  - fd01bfae3ca2fe03faa321e679892e5a
         | 
| 82 | 
            +
                  X-Runtime:
         | 
| 83 | 
            +
                  - '0.042136'
         | 
| 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":["b2fd1ad42f706a73","a1f3fab6393d3a6a"],"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:28:15 GMT
         | 
| 89 | 
            +
            - request:
         | 
| 90 | 
            +
                method: post
         | 
| 91 | 
            +
                uri: https://owner-api.teslamotors.com/api/1/vehicles/1514029006966957156/command/set_temps
         | 
| 92 | 
            +
                body:
         | 
| 93 | 
            +
                  encoding: UTF-8
         | 
| 94 | 
            +
                  string: driver_temp=23.7&passenger_temp=18.1
         | 
| 95 | 
            +
                headers:
         | 
| 96 | 
            +
                  Authorization:
         | 
| 97 | 
            +
                  - Bearer f513f3cc8873c7cfc3e670c6300490fb151cc716195c37c0730da431013f59e8
         | 
| 98 | 
            +
              response:
         | 
| 99 | 
            +
                status:
         | 
| 100 | 
            +
                  code: 200
         | 
| 101 | 
            +
                  message: OK
         | 
| 102 | 
            +
                headers:
         | 
| 103 | 
            +
                  Server:
         | 
| 104 | 
            +
                  - nginx
         | 
| 105 | 
            +
                  Date:
         | 
| 106 | 
            +
                  - Wed, 17 Dec 2014 01:28:14 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 | 
            +
                  - a779205e4d3300c65565072b15682ca4
         | 
| 123 | 
            +
                  X-Runtime:
         | 
| 124 | 
            +
                  - '0.226662'
         | 
| 125 | 
            +
                body:
         | 
| 126 | 
            +
                  encoding: UTF-8
         | 
| 127 | 
            +
                  string: '{"response":{"reason":"","result":true}}'
         | 
| 128 | 
            +
                http_version: 
         | 
| 129 | 
            +
              recorded_at: Wed, 17 Dec 2014 01:28:15 GMT
         | 
| 130 | 
            +
            recorded_with: VCR 2.9.3
         |