tesla-inventory 3.2.5 → 3.2.7

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.5",
5
+ "version": "3.2.7",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
@@ -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
- "MT320": 11310,
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,
@@ -72,10 +72,10 @@
72
72
  "PMBL": 22100,
73
73
  "PMNG": 13000,
74
74
  "PMSS": 22100,
75
- "PN00": 32500,
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,