Skip to content

Commit

Permalink
chore: doc for base client
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Oct 7, 2023
1 parent 24b0831 commit d8c3110
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion ya_tracker_client/domain/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ class BaseClient(ABC):

def __init__(
self,
organisation_id: str | int,
organisation_id: str | int | None = None,
oauth_token: str | None = None,
iam_token: str | None = None,
api_host: str = "https://api.tracker.yandex.net",
api_version: str = "v2",
) -> None:
"""
:param organisation_id: ID from admin panel at Yandex Tracker. No needed for Yandex developers.
:param oauth_token: OAuth token from registered application at Yandex OAuth - https://oauth.yandex.ru/
:param iam_token: IAM token from registered application at Yandex OAuth - https://oauth.yandex.ru/
:param api_host: Host of your Tracker. For Yandex developers - https://st-api.yandex-team.ru
:param api_version: Version of API. Currently supported only v2 version.
"""
self._headers: dict[str, str] = {}

# Yandex 360 uses integer identifiers and Yandex Cloud prefer strings in identifiers
Expand Down
2 changes: 1 addition & 1 deletion ya_tracker_client/domain/repositories/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def add_comment(
summonees=summonees,
maillist_summonees=maillist_summonees,
).model_dump(exclude_none=True, by_alias=True),
params={"is_add_to_followers": str(is_add_to_followers).lower()}
params={"is_add_to_followers": str(is_add_to_followers).lower()},
)
return self._decode(raw_response, Comment)

Expand Down

0 comments on commit d8c3110

Please sign in to comment.