Skip to content

Commit

Permalink
Merge pull request #36 from seamapi/doc-wait-with-get
Browse files Browse the repository at this point in the history
docs: Document how to wait on an action_attempt_id
  • Loading branch information
razor-x authored Dec 24, 2023
2 parents 8bf6300 + 49ffbc1 commit b6e5763
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ const seam = new SeamHttp({
await seam.locks.unlockDoor({ device_id })
```

If you have already have an action attempt id
and want to wait for it to resolve, simply use

```ts
await seam.actionAttempts.get(
{ action_attempt_id },
{
waitForActionAttempt: true,
},
)
```

Using the `waitForActionAttempt` option:

- Polls the action attempt up to the `timeout`
Expand Down

0 comments on commit b6e5763

Please sign in to comment.