Skip to content

Commit 9d31f0e

Browse files
committed
Merge branch 'develop' into enhancement/254-product-base-types-add-support
# Conflicts: # ayon_api/_api_helpers/projects.py
2 parents dae95dd + a62ff08 commit 9d31f0e

File tree

5 files changed

+203
-43
lines changed

5 files changed

+203
-43
lines changed

ayon_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
get_build_in_anatomy_preset,
154154
get_rest_project,
155155
get_rest_projects,
156+
get_rest_projects_list,
156157
get_project_names,
157158
get_projects,
158159
get_project,
@@ -431,6 +432,7 @@
431432
"get_build_in_anatomy_preset",
432433
"get_rest_project",
433434
"get_rest_projects",
435+
"get_rest_projects_list",
434436
"get_project_names",
435437
"get_projects",
436438
"get_project",

ayon_api/_api.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
BundlesInfoDict,
6565
AnatomyPresetDict,
6666
SecretDict,
67+
ProjectListDict,
6768
AnyEntityDict,
6869
ProjectDict,
6970
FolderDict,
@@ -3580,6 +3581,31 @@ def get_rest_projects(
35803581
)
35813582

35823583

3584+
def get_rest_projects_list(
3585+
active: Optional[bool] = True,
3586+
library: Optional[bool] = None,
3587+
) -> list[ProjectListDict]:
3588+
"""Receive available projects.
3589+
3590+
User must be logged in.
3591+
3592+
Args:
3593+
active (Optional[bool]): Filter active/inactive projects. Both
3594+
are returned if 'None' is passed.
3595+
library (Optional[bool]): Filter standard/library projects. Both
3596+
are returned if 'None' is passed.
3597+
3598+
Returns:
3599+
list[ProjectListDict]: List of available projects.
3600+
3601+
"""
3602+
con = get_server_api_connection()
3603+
return con.get_rest_projects_list(
3604+
active=active,
3605+
library=library,
3606+
)
3607+
3608+
35833609
def get_project_names(
35843610
active: Optional[bool] = True,
35853611
library: Optional[bool] = None,

ayon_api/_api_helpers/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
ServerVersion,
1515
ProjectDict,
1616
StreamType,
17+
AttributeScope,
1718
)
1819

1920
_PLACEHOLDER = object()
@@ -128,6 +129,11 @@ def get_user(
128129
) -> Optional[dict[str, Any]]:
129130
raise NotImplementedError()
130131

132+
def get_attributes_fields_for_type(
133+
self, entity_type: AttributeScope
134+
) -> set[str]:
135+
raise NotImplementedError()
136+
131137
def _prepare_fields(
132138
self,
133139
entity_type: str,

0 commit comments

Comments
 (0)