Fix examples and SDK for Immich v2 API compatibility
Some checks failed
Integration Tests / integration-test (push) Failing after 6s

- Fix AssetUploadStatus serialization to use snake_case (created/duplicate/rejected)
- Fix AssetOrder serialization to use lowercase (asc/desc)
- Add file_created_at/file_modified_at to UploadAssetBuilder
- Fix AddAssetsBuilder response type to Vec<Value> instead of AlbumResponse
- Fix ServerAbout model - version is String not ServerVersion struct
- Update upload_photos.rs to handle duplicate responses correctly
- Update server_info.rs to display new ServerAbout fields
- Update AGENTS.md with new example list
This commit is contained in:
Joakim Hulthe
2026-04-14 20:18:41 +00:00
parent 2e7db3b35a
commit c39e0a5058
6 changed files with 104 additions and 11 deletions

View File

@@ -38,6 +38,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let about = client.server().about().await?;
println!(" Version: {}", about.version);
println!(" Version URL: {}", about.version_url);
println!(" Licensed: {}", about.licensed);
if let Some(ref build) = about.build {
println!(" Build: {}", build);
}
if let Some(ref repository) = about.repository {
println!(" Repository: {}", repository);
}
Ok(())
}

View File

@@ -60,6 +60,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
// Create an album and add the uploaded asset
// Note: For duplicates, the ID is returned even though status is duplicate
if let Some(asset_id) = result.id {
let album = client
.albums()
@@ -68,7 +69,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.execute()
.await?;
client
let _add_result = client
.albums()
.add_assets(album.id)
.asset_ids([asset_id])