StashClientProtocol
Mixin for image-related client methods.
Functions
find_image
| Name | Type | Description | Default |
|---|---|---|---|
id | str | The ID of the image to find | required |
| Type | Description |
|---|---|
Image | None | Image object if found, None otherwise |
find_images
| Name | Type | Description | Default |
|---|---|---|---|
filter_ | dict[str, Any] | None | Optional general filter parameters: - q: str (search query) - direction: SortDirectionEnum (ASC/DESC) - page: int - per_page: int - sort: str (field to sort by) | None |
image_filter | dict[str, Any] | None | Optional image-specific filter | None |
q | str | None | Optional search query (alternative to filter_[“q”]) | None |
| Type | Description |
|---|---|
FindImagesResultType | FindImagesResultType. |
create_image
| Name | Type | Description | Default |
|---|---|---|---|
image | Image | Image object with the data to create. Required fields: - title: Image title | required |
| Type | Description |
|---|---|
Image | Created Image object with ID and any server-generated fields |
| Type | Description |
|---|---|
ValueError | If the image data is invalid |
TransportError | If the request fails |
update_image
| Name | Type | Description | Default |
|---|---|---|---|
image | Image | Image object with updated data. Required fields: - id: Image ID to update Any other fields that are set will be updated. Fields that are None will be ignored. | required |
| Type | Description |
|---|---|
Image | Updated Image object with any server-generated fields |
| Type | Description |
|---|---|
ValueError | If the image data is invalid |
TransportError | If the request fails |
image_destroy
| Name | Type | Description | Default |
|---|---|---|---|
input_data | ImageDestroyInput | dict[str, Any] | ImageDestroyInput object or dictionary. | required |
| Type | Description |
|---|---|
bool | True if the image was successfully deleted |
| Type | Description |
|---|---|
ValueError | If the image ID is invalid |
TransportError | If the request fails |
images_destroy
| Name | Type | Description | Default |
|---|---|---|---|
input_data | ImagesDestroyInput | dict[str, Any] | ImagesDestroyInput object or dictionary. | required |
| Type | Description |
|---|---|
bool | True if the images were successfully deleted |
| Type | Description |
|---|---|
ValueError | If any image ID is invalid |
TransportError | If the request fails |
bulk_image_update
| Name | Type | Description | Default |
|---|---|---|---|
input_data | BulkImageUpdateInput | dict[str, Any] | BulkImageUpdateInput object or dictionary with fields to update. | required |
return_fields | str | None | If provided, use a minimal inline mutation requesting only these fields (e.g. "id"). Avoids the full fragment response, which is significantly faster for fire-and-forget bulk updates. When set, returns a list of raw dicts instead of Image objects. | None |
| Type | Description |
|---|---|
list[Image] | list[dict[str, Any]] | List of updated Image objects (default), or list of dicts when |
list[Image] | list[dict[str, Any]] | return_fields is provided. |
images_update
| Name | Type | Description | Default |
|---|---|---|---|
updates | list[ImageUpdateInput] | list[dict[str, Any]] | List of ImageUpdateInput objects or dictionaries, each containing: - id: Image ID to update (required) - Any other fields to update for that specific image | required |
| Type | Description |
|---|---|
list[Image] | List of updated Image objects (may contain None for failed updates) |
image_increment_o
| Name | Type | Description | Default |
|---|---|---|---|
id | str | Image ID | required |
| Type | Description |
|---|---|
int | New O-count value after incrementing |
Example
image_decrement_o
| Name | Type | Description | Default |
|---|---|---|---|
id | str | Image ID | required |
| Type | Description |
|---|---|
int | New O-count value after decrementing |
Example
image_reset_o
| Name | Type | Description | Default |
|---|---|---|---|
id | str | Image ID | required |
| Type | Description |
|---|---|
int | New O-count value (0) |
Example