tesla-inventory 3.2.6 → 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 +15 -2
- package/package.json +1 -1
- package/src/prices/au.json +2 -1
- package/src/prices/se.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,11 @@ $ npm install tesla-inventory --save
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
const
|
|
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(
|
|
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
|
+
"version": "3.2.7",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "josefrancisco.verdu@gmail.com",
|
package/src/prices/au.json
CHANGED
|
@@ -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":
|
|
30
|
+
"MT327": 7410,
|
|
30
31
|
"MT328": 20410,
|
|
31
32
|
"MT329": 26110,
|
|
32
33
|
"MT337": 7410,
|