Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
yuji38kwmt committed Aug 14, 2024
1 parent 24692ff commit fb07a27
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 39 deletions.
2 changes: 0 additions & 2 deletions annofabapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,8 @@ def __init__(
self.url_prefix = f"{endpoint_url}/api/v1"
self.session = requests.Session()

#: login, refresh_tokenで取得したtoken情報
self.token_dict: Optional[Dict[str, Any]] = None

#: Signed Cookie情報
self.cookies: Optional[RequestsCookieJar] = None

self.__account_id: Optional[str] = None
Expand Down
4 changes: 3 additions & 1 deletion annofabapi/api2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ class AnnofabApi2(AbstractAnnofabApi2):
Args:
api: API v1のインスタンス(一部のAPIは、v1のログインメソッドを利用するため)
Attributes:
cookies: Signed Cookie情報
"""

def __init__(self, api: AnnofabApi) -> None:
self.api = api
self.url_prefix = f"{api.endpoint_url}/api/v2"

#: Signed Cookie情報
cookies: Optional[RequestsCookieJar] = None

#########################################
Expand Down
8 changes: 5 additions & 3 deletions annofabapi/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ class Resource:
endpoint_url: Annofab APIのエンドポイント。
input_mfa_code_via_stdin: MFAコードを標準入力から入力するかどうか
Attributes:
api: ``annofabapi.AnnofabApi`` のインスタンス
wrapper: ``annofabapi.Wrapper`` のインスタンス
api2: ``annofabapi.AnnofabApi2`` のインスタンス
"""

def __init__(
self, login_user_id: str, login_password: str, *, endpoint_url: str = DEFAULT_ENDPOINT_URL, input_mfa_code_via_stdin: bool = False
) -> None:
#: AnnofabApi Instance
self.api = AnnofabApi(
login_user_id=login_user_id, login_password=login_password, endpoint_url=endpoint_url, input_mfa_code_via_stdin=input_mfa_code_via_stdin
)

#: Wrapper Instance
self.wrapper = Wrapper(self.api)

#: AnnofabApi2 Instance
self.api2 = AnnofabApi2(self.api)

logger.debug("Create annofabapi resource instance :: %s", {"login_user_id": login_user_id, "endpoint_url": endpoint_url})
Expand Down
5 changes: 0 additions & 5 deletions docs/api_reference/dataclass.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ annofabapi.dataclass.job module
.. automodule:: annofabapi.dataclass.job
:members:

annofabapi.dataclass.my module
------------------------------
.. automodule:: annofabapi.dataclass.my
:members:

annofabapi.dataclass.organization module
----------------------------------------
.. automodule:: annofabapi.dataclass.organization
Expand Down
56 changes: 28 additions & 28 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb07a27

Please sign in to comment.