|
11 | 11 | from .settings import BUGOUT_BROOD_URL, BUGOUT_SPIRE_URL, REQUESTS_TIMEOUT |
12 | 12 |
|
13 | 13 |
|
14 | | -class InvalidParameters(ValueError): |
15 | | - """ |
16 | | - Raised when provided invalid parameters. |
17 | | - """ |
18 | | - |
19 | | - |
20 | 14 | class Bugout: |
21 | 15 | def __init__( |
22 | 16 | self, |
@@ -141,10 +135,16 @@ def delete_user( |
141 | 135 |
|
142 | 136 | # Token handlers |
143 | 137 | def create_token( |
144 | | - self, username: str, password: str, timeout: float = REQUESTS_TIMEOUT |
| 138 | + self, |
| 139 | + username: str, |
| 140 | + password: str, |
| 141 | + application_id: Optional[Union[str, uuid.UUID]] = None, |
| 142 | + timeout: float = REQUESTS_TIMEOUT, |
145 | 143 | ) -> data.BugoutToken: |
146 | 144 | self.user.timeout = timeout |
147 | | - return self.user.create_token(username=username, password=password) |
| 145 | + return self.user.create_token( |
| 146 | + username=username, password=password, application_id=application_id |
| 147 | + ) |
148 | 148 |
|
149 | 149 | def create_token_restricted( |
150 | 150 | self, |
@@ -370,9 +370,7 @@ def list_resources( |
370 | 370 | timeout: float = REQUESTS_TIMEOUT, |
371 | 371 | ) -> data.BugoutResources: |
372 | 372 | self.resource.timeout = timeout |
373 | | - return self.resource.list_resources( |
374 | | - token=token, params=params |
375 | | - ) |
| 373 | + return self.resource.list_resources(token=token, params=params) |
376 | 374 |
|
377 | 375 | def delete_resource( |
378 | 376 | self, |
|
0 commit comments