Skip to main content

Module api_client

Module api_client 

Source
Expand description

Integrates with the Immich API, handles connectivity failover, and provides album/cache helpers.

The client probes both an internal (LAN) and external (WAN) URL and locks onto whichever responds first. Submodules split the API surface by domain: albums, library, search, upload, and errors. All HTTP requests share a single reqwest::Client connection pool.

ModulesΒ§

albums πŸ”’
Album management: list, create, cache, and add assets to albums.
errors πŸ”’
HTTP and network error classification for user-facing diagnostics.
library πŸ”’
Library browsing: fetch albums, thumbnails, asset details, download originals, delete.
search πŸ”’
Search and explore: smart search, OCR, metadata filters, people, places, server stats.
suggestions πŸ”’
Search suggestion autocomplete from the Immich server.
upload πŸ”’
Asset upload flow including duplicate detection, checksum computation, and retry logic.
upload_helpers πŸ”’
Upload-related helper functions: MIME detection, timezone fixup, file timestamps.

StructsΒ§

AlbumSummary πŸ”’
Simplified album summary response from Immich.
AlbumUser
A user entry within an album’s user list.
AlbumUserInfo
Minimal user identity nested inside an AlbumUser.
ApiClientSettings πŸ”’
In-memory API client connection URLs and configuration settings.
ApiIssue
Represents an actionable API or connection issue encountered during operations.
AssetDetails
Asset details metadata payload.
AssetWithExif πŸ”’
Container matching assets returned alongside their EXIF metadata.
ExifInfo
Full EXIF metadata schema properties returned by Immich.
ExifSearchAssets πŸ”’
Asset items list returned inside an EXIF search response.
ExifSearchResponse πŸ”’
Search results response wrapper for EXIF queries.
ExploreItem
Discovered item in an Immich explore page section.
ExploreSection
Discovered category section on the Immich explore page (e.g. places or tags).
ImmichApiClient
Asynchronous Immich API client with failover and request serialization.
LibraryAlbum
Detailed Immich library album representation.
LibraryAsset
Detailed Immich library asset representation.
MetadataSearchFilters
Structured filters passed down search operations.
PeopleResponse πŸ”’
List wrapper of recognized people returned by Immich.
Person
A recognized person returned by Immich’s facial recognition.
PlaceItem
One city with a representative asset ID for thumbnail display. Places display category representation holding the representative thumbnail asset.
SearchAssetSection πŸ”’
Paginated asset list section within a search response.
SearchResponse πŸ”’
Search response wrapper.
ServerAbout
Immich server configuration and version details.
ServerStatistics
Server-wide statistics (admin-only). Returned by /api/server/statistics.
ServerStats
Immich server asset count statistics.
UsageByUser
Per-user usage row from /api/server/statistics.

EnumsΒ§

SortOrder
Direction of sort results.
ThumbnailSize
Type of asset thumbnails requested.

FunctionsΒ§

deserialize_checksum_to_hex πŸ”’
Immich returns asset checksums as base64-encoded SHA1, while Mimick computes and stores them as lowercase hex. Normalize on deserialization so every comparison site (album diff, deletion lookup, sync index) sees the same canonical form.
normalize_checksum_to_hex

Type AliasesΒ§

TransferProgressCallback