waifuim
    Preparing search index...

    Class AlbumsService

    Index

    Constructors

    Methods

    • Add an image to an album.

      Add an image to one of your albums. Use "favorites" as albumId to add to your favorites.

      Parameters

      • userId: number | "me"

        The user ID or "me".

      • albumId: number | "favorites"

        The album ID or "favorites".

      • imageId: number

        The ID of the image to add.

      Returns Promise<void>

      AuthenticationRequired if authentication is missing.

      ApiError with status 401 if authentication is invalid.

      ApiError with status 404 if album or image not found.

    • Create a new album.

      Create a new album to organize images. You can only create albums for yourself.

      Parameters

      • userId: number | "me"

        The user ID or "me" (must be your own account).

      • options: CreateAlbumOptions

        The album details.

      Returns Promise<Album>

      The created album.

      AuthenticationRequired if authentication is missing.

      ApiError with status 400 if invalid album data.

      ApiError with status 401 if authentication is invalid.

    • Delete an album.

      Permanently delete an album. The default "Favorites" album cannot be deleted. Images in the album are NOT deleted, only removed from the album.

      Parameters

      • userId: number | "me"
      • albumId: number

      Returns Promise<void>

      AuthenticationRequired if authentication is missing.

      ApiError with status 400 if trying to delete the default album.

      ApiError with status 401 if authentication is invalid.

      ApiError with status 404 if album not found.

    • Get album details.

      Returns details for a specific album including image count.

      Parameters

      • userId: number | "me"

        The user ID or "me".

      • albumId: number | "favorites"

        The album ID or "favorites" for the default album.

      Returns Promise<Album>

      ApiError with status 404 if album or user not found.

    • Remove an image from an album.

      Remove an image from one of your albums. The image is not deleted, only unlinked from the album.

      Parameters

      • userId: number | "me"

        The user ID or "me".

      • albumId: number | "favorites"

        The album ID or "favorites".

      • imageId: number

        The image ID to remove.

      Returns Promise<void>

      AuthenticationRequired if authentication is missing.

      ApiError with status 401 if authentication is invalid.

      ApiError with status 404 if album or image not found in album.

    • Update an album.

      Update album name or description. You can only update your own albums.

      Parameters

      • userId: number | "me"

        The user ID or "me".

      • albumId: number | "favorites"

        The album ID or "favorites".

      • options: UpdateAlbumOptions

        The fields to update.

      Returns Promise<Album>

      The updated album.

      AuthenticationRequired if authentication is missing.

      ApiError with status 400 if invalid album data.

      ApiError with status 401 if authentication is invalid.

      ApiError with status 404 if album not found.