|
10 | 10 | import annofabapi.utils
|
11 | 11 | from annofabapi import AnnofabApi
|
12 | 12 | from annofabapi.exceptions import AnnofabApiException
|
13 |
| -from annofabapi.models import (AnnotationSpecs, InputData, Inspection, JobInfo, OrganizationMember, Project, |
14 |
| - ProjectMember, SupplementaryData, Task) |
| 13 | +from annofabapi.models import (AnnotationSpecs, InputData, Inspection, JobInfo, MyOrganization, OrganizationMember, |
| 14 | + Project, ProjectMember, SupplementaryData, Task) |
15 | 15 |
|
16 | 16 | logger = logging.getLogger(__name__)
|
17 | 17 |
|
@@ -75,7 +75,7 @@ def _get_all_objects(func_get_list: Callable, limit: int, **kwargs_for_func_get_
|
75 | 75 | get_XXX関数で取得した情報の一覧
|
76 | 76 |
|
77 | 77 | """
|
78 |
| - arg_query_params = kwargs_for_func_get_list['query_params'] |
| 78 | + arg_query_params = kwargs_for_func_get_list.get('query_params') |
79 | 79 | copied_query_params = copy.deepcopy(arg_query_params) if arg_query_params is not None else {}
|
80 | 80 |
|
81 | 81 | all_objects: List[Dict[str, Any]] = []
|
@@ -387,6 +387,18 @@ def search_updated_inspections(arg_inspection: Inspection) -> bool:
|
387 | 387 | content = self.api.batch_update_inspections(project_id, task_id, input_data_id, req_inspection)[0]
|
388 | 388 | return content
|
389 | 389 |
|
| 390 | + ######################################### |
| 391 | + # Public Method : AfMyApi |
| 392 | + ######################################### |
| 393 | + def get_all_my_organizations(self) -> List[MyOrganization]: |
| 394 | + """ |
| 395 | + 所属しているすべての組織一覧を取得する |
| 396 | +
|
| 397 | + Returns: |
| 398 | + すべての所属一覧 |
| 399 | + """ |
| 400 | + return self._get_all_objects(self.api.get_my_organizations, limit=200) |
| 401 | + |
390 | 402 | #########################################
|
391 | 403 | # Public Method : AfOrganizationApi
|
392 | 404 | #########################################
|
|
0 commit comments