Applications¶
barbara.resources.applications.ApplicationsResource ¶
ApplicationsResource(client: BarbaraClient)
list ¶
list(
*,
search: Optional[str] = None,
size: Optional[int] = None,
) -> List[Application]
Returns a single page — use paginate() for total or to
page through more applications than the server's default page size.
create ¶
create(
name: str,
long_description: str,
developer: str,
*,
docker: bool,
short_description: Optional[str] = None,
icon_path: Optional[str] = None,
timeout: Optional[float] = None,
) -> None
timeout overrides the client's default request timeout for
this call only — useful when icon_path is large and/or the
connection is slow.
list_versions ¶
list_versions(
application_id: str,
*,
size: Optional[int] = None,
from_: Optional[int] = None,
sort_column: Optional[str] = None,
sort_order: Optional[str] = None,
) -> List[Dict[str, Any]]
The response wraps the array as {"appVersionList": [...], "total": ...}.
Returns a single page — the server defaults to size=10, so an
application with more versions than that will silently omit the
rest unless you page through with size/from_, or narrow
down with sort_column/sort_order (e.g. the latest version
is sort_column="created", sort_order="desc", size=1).
create_version ¶
create_version(
application_id: str,
artifact_path: str,
name: str,
architectures: List[str],
release_notes: List[str],
*,
timeout: Optional[float] = None,
) -> None
timeout overrides the client's default request timeout for
this call only — the artifact upload is often the slowest call an
application makes.
default_services
staticmethod
¶
default_services(
app_version: Dict[str, Any],
) -> tuple[List[Dict[str, Any]], List[Dict[str, Any]]]
See :func:default_services_from_version.
barbara.resources.applications.AsyncApplicationsResource ¶
AsyncApplicationsResource(client: AsyncBarbaraClient)
list_versions
async
¶
list_versions(
application_id: str,
*,
size: Optional[int] = None,
from_: Optional[int] = None,
sort_column: Optional[str] = None,
sort_order: Optional[str] = None,
) -> List[Dict[str, Any]]
Returns a single page — see the sync list_versions docstring.
default_services
staticmethod
¶
default_services(
app_version: Dict[str, Any],
) -> tuple[List[Dict[str, Any]], List[Dict[str, Any]]]
See :func:default_services_from_version.