Skip to content

Commit 1e2c2bd

Browse files
Add readme instructions on how to use SeamMultiWorkspace client (#57)
* Add readme instruction on how to use SeamMultiWorkspace * Fix code-block lint error
1 parent 9211e96 commit 1e2c2bd

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,24 @@ Using the ``wait_for_action_attempt`` option:
191191
except SeamActionAttemptTimeoutError as e:
192192
print("Door took too long to unlock")
193193
194+
Interacting with Multiple Workspaces
195+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196+
197+
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.
198+
199+
A Personal Access Token is scoped to a Seam Console user. Obtain one from the Seam Console.
200+
201+
.. code-block:: python
202+
203+
# Pass as an option the constructor
204+
seam = SeamMultiWorkspace(personal_access_token="your-personal-access-token")
205+
206+
# Use the factory method
207+
seam = SeamMultiWorkspace.from_personal_access_token("your-personal-access-token")
208+
209+
# List workspaces authorized for this Personal Access Token
210+
workspaces = seam.workspaces.list()
211+
194212
Advanced Usage
195213
~~~~~~~~~~~~~~
196214

0 commit comments

Comments
 (0)