Skip to content

Commit 4eb8e8f

Browse files
Daisuke MiyazoeDaisuke Miyazoe
authored andcommitted
タスクのコメントを取得できる api を叩くメソッドwo
を追加
1 parent d27de9b commit 4eb8e8f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

fastlabel/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5184,6 +5184,27 @@ def get_histories(
51845184

51855185
return self.api.get_request(endpoint, params=params)
51865186

5187+
def get_comments(
5188+
self,
5189+
project: str,
5190+
task_id: str,
5191+
offset: int = None,
5192+
limit: int = 100,
5193+
) -> list:
5194+
if limit > 1000:
5195+
raise FastLabelInvalidException(
5196+
"Limit must be less than or equal to 1000.", 422
5197+
)
5198+
endpoint = "comments"
5199+
params = {"project": project}
5200+
if task_id:
5201+
params["taskId"] = task_id
5202+
if offset:
5203+
params["offset"] = offset
5204+
if limit:
5205+
params["limit"] = limit
5206+
return self.api.get_request(endpoint, params=params)
5207+
51875208
def mask_to_fastlabel_segmentation_points(
51885209
self, mask_image: Union[str, np.ndarray]
51895210
) -> List[List[List[int]]]:

0 commit comments

Comments
 (0)