Skip to content

Commit

Permalink
Add readme instructions on how to use SeamMultiWorkspace client (#57)
Browse files Browse the repository at this point in the history
* Add readme instruction on how to use SeamMultiWorkspace

* Fix code-block lint error
  • Loading branch information
andrii-balitskyi committed May 21, 2024
1 parent 3df59be commit 88337ce
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,24 @@ Using the ``wait_for_action_attempt`` option:
except SeamActionAttemptTimeoutError as e:
print("Door took too long to unlock")
Interacting with Multiple Workspaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some Seam API endpoints interact with multiple workspaces. The ``SeamMultiWorkspace`` client is not bound to a specific workspace and may use those endpoints with a personal access token authentication method.

A Personal Access Token is scoped to a Seam Console user. Obtain one from the Seam Console.

.. code-block:: python
# Pass as an option the constructor
seam = SeamMultiWorkspace(personal_access_token="your-personal-access-token")
# Use the factory method
seam = SeamMultiWorkspace.from_personal_access_token("your-personal-access-token")
# List workspaces authorized for this Personal Access Token
workspaces = seam.workspaces.list()
Advanced Usage
~~~~~~~~~~~~~~

Expand Down

0 comments on commit 88337ce

Please sign in to comment.