File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -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 (' your-api-key ' )
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.
You can’t perform that action at this time.
0 commit comments