Crate icloud_album_rs

Crate icloud_album_rs 

Source
Expand description

A Rust library for interacting with iCloud shared albums.

This library provides functionality to fetch, parse, and download photos from iCloud shared albums using their public share token. It handles the various API endpoints, authentication, redirects, and data parsing needed to work with Apple’s iCloud shared album service.

§Logging

This library uses the log crate for logging. You can enable logging by initializing a logger in your application, such as env_logger. Set the RUST_LOG environment variable to control log levels (e.g., RUST_LOG=info).

// Initialize the logger in your application
env_logger::init();

The library logs warnings for non-critical issues, such as type inconsistencies in API responses, and errors for more serious problems.

Modules§

api
Module for API calls to fetch metadata and photos API client for interacting with iCloud shared albums.
base_url
Module handling the base URL generation for API calls URL generation for iCloud album API endpoints.
enrich
Module for enriching photos with their URLs Photo data enrichment functions.
models
Module containing data model structures Data structures for iCloud album API responses.
redirect
Module handling redirects from the iCloud API Redirect handling for iCloud API requests.
utils
Module containing utility functions for file handling ABOUTME: Utility functions for file operations and media handling ABOUTME: Contains functions for MIME type detection, file extension mapping, and other utilities

Functions§

download_photo
Downloads a single photo or video from a shared album
get_icloud_photos
Main entry point for fetching photos from an iCloud shared album