Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pybacklogpy/Status.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ def __init__(self, config: Optional[BacklogConfigure] = None):
_config = config if config else None
self.rs = RequestSender(_config)

def get_status_list(self,
project_id_or_key: str,
) -> Response:
"""
権限メソッドURLURL パラメーターリクエストパラメーターレスポンス例
https://developer.nulab.com/ja/docs/backlog/api/2/get-status-list

:param project_id_or_key: プロジェクトのID または プロジェクトキー

:return: レスポンス
"""

path = self.base_path + '/{project_id_or_key}/statuses'.format(project_id_or_key=project_id_or_key)
return self.rs.send_get_request(path=path, url_param={})

def add_status(self,
project_id_or_key: str,
name: str,
Expand Down
7 changes: 7 additions & 0 deletions tests/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ def test_status(self):
)
self.assertTrue(response_update_order.ok, msg='状態の順序の更新に失敗')

response_get_status_list = self.status.get_status_list(
project_id_or_key=self.project_key
)
self.assertTrue(response_get_status_list.ok, msg='ステータス一覧の取得に失敗')
response_list = response_to_json(response_get_status_list)
self.assertIsInstance(response_list, list, msg='ステータス一覧の取得に失敗')

response_delete_status = self.status.delete_status(
project_id_or_key=self.project_key,
status_id=status_id,
Expand Down