@seamapi/http 0.25.1 → 0.25.2
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 +18 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -74,13 +74,29 @@ $ npm install -D @seamapi/types@latest
|
|
|
74
74
|
|
|
75
75
|
## Usage
|
|
76
76
|
|
|
77
|
+
### Examples
|
|
78
|
+
|
|
79
|
+
_These examples assume `SEAM_API_KEY` is set in your environment._
|
|
80
|
+
|
|
81
|
+
#### List devices
|
|
82
|
+
|
|
77
83
|
```ts
|
|
78
84
|
import { SeamHttp } from '@seamapi/http/connect'
|
|
79
85
|
|
|
80
|
-
const seam = new SeamHttp(
|
|
86
|
+
const seam = new SeamHttp()
|
|
81
87
|
const devices = await seam.devices.list()
|
|
82
88
|
```
|
|
83
89
|
|
|
90
|
+
#### Unlock a door
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { SeamHttp } from '@seamapi/http/connect'
|
|
94
|
+
|
|
95
|
+
const seam = new SeamHttp()
|
|
96
|
+
const lock = await seam.locks.get({ name: 'Front Door' })
|
|
97
|
+
await seam.locks.unlockDoor({ device_id: lock.device_id })
|
|
98
|
+
```
|
|
99
|
+
|
|
84
100
|
### Authentication Methods
|
|
85
101
|
|
|
86
102
|
The SDK supports several authentication mechanisms.
|
|
@@ -124,7 +140,7 @@ const seam = SeamHttp.fromClientSessionToken('some-client-session-token')
|
|
|
124
140
|
|
|
125
141
|
The client session token may be updated using
|
|
126
142
|
|
|
127
|
-
```
|
|
143
|
+
```ts
|
|
128
144
|
const seam = SeamHttp.fromClientSessionToken('some-client-session-token')
|
|
129
145
|
|
|
130
146
|
await seam.updateClientSessionToken('some-new-client-session-token')
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiJavascriptHttpVersion = "0.25.
|
|
1
|
+
declare const seamapiJavascriptHttpVersion = "0.25.2";
|
|
2
2
|
export default seamapiJavascriptHttpVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/src/lib/version.ts
CHANGED