Skip to content

Commit

Permalink
added new method to public api
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Nov 15, 2024
1 parent 30941f0 commit 4204217
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ayon_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
delete_dependency_package,
download_dependency_package,
upload_dependency_package,
delete_addon,
delete_addon_version,
upload_addon_zip,
get_bundles,
create_bundle,
Expand Down Expand Up @@ -336,6 +338,8 @@
"delete_dependency_package",
"download_dependency_package",
"upload_dependency_package",
"delete_addon",
"delete_addon_version",
"upload_addon_zip",
"get_bundles",
"create_bundle",
Expand Down
29 changes: 29 additions & 0 deletions ayon_api/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,35 @@ def upload_dependency_package(*args, **kwargs):
return con.upload_dependency_package(*args, **kwargs)


def delete_addon(*args, **kwargs):
"""Delete addon from server.
Delete all versions of addon from server.
Args:
addon_name (str): Addon name.
purge (Optional[bool]): Purge all data related to the addon.
"""
con = get_server_api_connection()
return con.delete_addon(*args, **kwargs)


def delete_addon_version(*args, **kwargs):
"""Delete addon version from server.
Delete all versions of addon from server.
Args:
addon_name (str): Addon name.
addon_version (str): Addon version.
purge (Optional[bool]): Purge all data related to the addon.
"""
con = get_server_api_connection()
return con.delete_addon_version(*args, **kwargs)


def upload_addon_zip(*args, **kwargs):
"""Upload addon zip file to server.
Expand Down

0 comments on commit 4204217

Please sign in to comment.