Skip to content

Commit b6e5763

Browse files
authored
Merge pull request #36 from seamapi/doc-wait-with-get
docs: Document how to wait on an action_attempt_id
2 parents 8bf6300 + 49ffbc1 commit b6e5763

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ const seam = new SeamHttp({
211211
await seam.locks.unlockDoor({ device_id })
212212
```
213213

214+
If you have already have an action attempt id
215+
and want to wait for it to resolve, simply use
216+
217+
```ts
218+
await seam.actionAttempts.get(
219+
{ action_attempt_id },
220+
{
221+
waitForActionAttempt: true,
222+
},
223+
)
224+
```
225+
214226
Using the `waitForActionAttempt` option:
215227

216228
- Polls the action attempt up to the `timeout`

0 commit comments

Comments
 (0)