pub struct Client { /* private fields */ }Implementations§
Source§impl Client
Public API
impl Client
Public API
pub fn new(base_url: impl Into<String>) -> Self
pub async fn get_next(&self) -> Result<Next, ApiError>
pub async fn get_photos(&self) -> Result<Vec<Photo>, ApiError>
pub async fn get_photo(&self, id: PhotoID) -> Result<Photo, ApiError>
pub async fn update_photo( &self, id: PhotoID, updates: &UpdatePhotoRequest, ) -> Result<(), ApiError>
pub async fn delete_photo(&self, id: PhotoID) -> Result<(), ApiError>
pub async fn get_albums(&self) -> Result<Vec<Album>, ApiError>
pub async fn get_album(&self, id: AlbumID) -> Result<Album, ApiError>
pub async fn create_album( &self, req: &CreateAlbumRequest, ) -> Result<Album, ApiError>
pub async fn update_album( &self, id: AlbumID, updates: &UpdateAlbumRequest, ) -> Result<(), ApiError>
pub async fn delete_album(&self, id: AlbumID) -> Result<(), ApiError>
pub async fn add_photo_to_album( &self, album_id: AlbumID, photo_id: PhotoID, ) -> Result<(), ApiError>
pub async fn remove_photo_from_album( &self, album_id: AlbumID, photo_id: PhotoID, ) -> Result<(), ApiError>
pub async fn get_settings(&self) -> Result<RotationSettings, ApiError>
pub async fn update_settings( &self, updates: &UpdateSettingsRequest, ) -> Result<(), ApiError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more