tesla-inventory 3.2.6 → 3.2.8

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.
package/README.md CHANGED
@@ -17,7 +17,11 @@ $ npm install tesla-inventory --save
17
17
  ## Usage
18
18
 
19
19
  ```js
20
- const teslaInventory = require('tesla-inventory')
20
+ const createTeslaInventory = require('tesla-inventory')
21
+
22
+ const fetcher = url => fetch(url).then(res => res.text())
23
+
24
+ const teslaInventory = createTeslaInventory(fetcher)
21
25
 
22
26
  teslaInventory('fr', {
23
27
  model: 's',
@@ -27,7 +31,16 @@ teslaInventory('fr', {
27
31
 
28
32
  ## API
29
33
 
30
- ### teslaInventory(inventory, [query], [gotOpts])
34
+ ### teslaInventory(fetcher)
35
+
36
+ #### fetcher
37
+
38
+ *Required*<br>
39
+ Type: `function`
40
+
41
+ The fetcher function used for performing the networking calls. It should return text ([example](https://github.com/teslahunt/inventory/blob/master/test/index.js#L6)).
42
+
43
+ ### .teslaInventory([query], [gotOpts])
31
44
 
32
45
  #### inventory
33
46
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tesla-inventory",
3
3
  "description": "Retrieve real-time data from Tesla Inventory.",
4
4
  "homepage": "https://github.com/Kikobeats/tesla-inventory",
5
- "version": "3.2.6",
5
+ "version": "3.2.8",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
package/src/codes.json CHANGED
@@ -356,6 +356,7 @@
356
356
  "MTS12": "Model S Plaid",
357
357
  "MTS13": "Model S Dual Motor All-Wheel Drive",
358
358
  "MTS14": "Model S Plaid Tri Motor All-Wheel Drive",
359
+ "MTS17": "Model S Standard Range",
359
360
  "MTX01": "Model X Standard Range",
360
361
  "MTX03": "Model X Long Range",
361
362
  "MTX04": "Model X Performance",
@@ -369,6 +370,7 @@
369
370
  "MTX12": "Model X Plaid",
370
371
  "MTX13": "Model X Plaid",
371
372
  "MTX14": "Model X Plaid Tri Motor All-Wheel Drive",
373
+ "MTX17": "Model X Standard Range",
372
374
  "MTY01": "Model Y Standard Range Rear-Wheel Drive",
373
375
  "MTY02": "Model Y Long Range Rear-Wheel Drive",
374
376
  "MTY03": "Model Y Long Range All-Wheel Drive",
@@ -21,12 +21,13 @@
21
21
  "MT308": 7410,
22
22
  "MT310": 20410,
23
23
  "MT311": 26110,
24
+ "MT315": 20410,
24
25
  "MT316": 20410,
25
26
  "MT317": 26110,
26
27
  "MT320": 7410,
27
28
  "MT322": 7410,
28
29
  "MT323": 24310,
29
- "MT327": 11310,
30
+ "MT327": 7410,
30
31
  "MT328": 20410,
31
32
  "MT329": 26110,
32
33
  "MT337": 7410,
@@ -75,7 +75,7 @@
75
75
  "PN00": 28000,
76
76
  "PPMR": 17500,
77
77
  "PPSB": 13000,
78
- "PR00": 35000,
78
+ "PR00": 28000,
79
79
  "PR01": 35000,
80
80
  "QTVB": 27100,
81
81
  "RFP2": 2000,