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
7474
7575## Usage
7676
77+ ### Examples
78+
79+ _ These examples assume ` SEAM_API_KEY ` is set in your environment._
80+
81+ #### List devices
82+
7783``` ts
7884import { SeamHttp } from ' @seamapi/http/connect'
7985
80- const seam = new SeamHttp (' your-api-key ' )
86+ const seam = new SeamHttp ()
8187const devices = await seam .devices .list ()
8288```
8389
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+
84100### Authentication Methods
85101
86102The SDK supports several authentication mechanisms.
You can’t perform that action at this time.
0 commit comments