Skip to content

Commit 855967b

Browse files
authored
Merge pull request #35 from bugout-dev/token-note
Token note during token creation
2 parents 4629eb4 + 1cda640 commit 855967b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

bugout/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
__email__ = "engineering@bugout.dev"
99
__license__ = "MIT"
10-
__version__ = "0.1.17"
10+
__version__ = "0.1.18"
1111

1212
__all__ = (
1313
"__author__",

bugout/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,15 @@ def create_token(
139139
username: str,
140140
password: str,
141141
application_id: Optional[Union[str, uuid.UUID]] = None,
142+
token_note: Optional[str] = None,
142143
timeout: float = REQUESTS_TIMEOUT,
143144
) -> data.BugoutToken:
144145
self.user.timeout = timeout
145146
return self.user.create_token(
146-
username=username, password=password, application_id=application_id
147+
username=username,
148+
password=password,
149+
application_id=application_id,
150+
token_note=token_note,
147151
)
148152

149153
def create_token_restricted(

bugout/user.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ def create_token(
161161
username: str,
162162
password: str,
163163
application_id: Optional[Union[str, uuid.UUID]] = None,
164+
token_note: Optional[str] = None,
164165
) -> BugoutToken:
165166
create_token_path = "token"
166167
data = {
167168
"username": username,
168169
"password": password,
169170
"application_id": application_id,
171+
"token_note": token_note,
170172
}
171173
result = self._call(method=Method.post, path=create_token_path, data=data)
172174
return BugoutToken(**result)

0 commit comments

Comments
 (0)