Albums

interface Albums

Provides functionality for working with albums.

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun addMediaToAlbum(albumId: Long, mediaIds: Set<Long> = emptySet(), mediaUris: List<Uri> = emptyList()): AddMediaToAlbumResult
Link copied to clipboard
abstract suspend fun createAlbum(userId: Long, name: String, type: AlbumType, mediaIds: Set<Long> = emptySet(), mediaUris: List<Uri> = emptyList()): CreateAlbumResult

Creates an album.

Link copied to clipboard
abstract fun createAlbumContentFlow(albumId: Long, sorting: Albums.ContentSorting = ContentSorting.CREATED_DESC): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createAlbumContentPagingFlow(albumId: Long, sorting: Albums.ContentSorting = ContentSorting.CREATED_DESC, config: PagingConfig = defaultPagingConfig): Flow<PagingData<MediaItem>>
Link copied to clipboard
Link copied to clipboard
abstract fun createAlbumFlow(albumId: Long): Flow<AlbumItem?>
Link copied to clipboard
abstract fun createAlbumsFlow(userId: Long, albumTypes: Set<AlbumType> = setOf(AlbumType.SIMPLE, AlbumType.SHARED_BY_ME), minItemCount: Int = 0, isVisible: Boolean? = null, hideItems: Boolean? = null, limit: Int? = null, sorting: Albums.AlbumsSorting = AlbumsSorting.UPDATED_DESC, mode: Albums.ListingMode = ListingMode.INTERSECT): Flow<List<AlbumItem>>
Link copied to clipboard
abstract fun createAlbumsPagingFlow(userId: Long, albumTypes: Set<AlbumType> = setOf(AlbumType.SIMPLE, AlbumType.SHARED_BY_ME), minItemCount: Int = 0, isVisible: Boolean? = null, hideItems: Boolean? = null, limit: Int? = null, sorting: Albums.AlbumsSorting = AlbumsSorting.UPDATED_DESC, mode: Albums.ListingMode = ListingMode.INTERSECT, config: PagingConfig = defaultPagingConfig): Flow<PagingData<AlbumItem>>

Creates Paging Flow for getting album list.

Link copied to clipboard
abstract suspend fun deleteAlbum(albumId: Long)

Deleting album with albumId.

Link copied to clipboard
abstract suspend fun deleteMediaFromAlbum(albumId: Long, mediaIds: Set<Long>): DeleteMediaFromAlbumResult

Deleting media with mediaIds from album with albumId. It only works with backend albums.

Link copied to clipboard
abstract suspend fun editAlbum(albumId: Long, type: AlbumType? = null, description: String? = null, isViewed: Boolean? = null, hideItems: Boolean? = null): AlbumItem

Edits an album with albumId.

Link copied to clipboard
abstract suspend fun fetchAlbumByBackendId(userId: Long, albumBackendId: String, coversCount: Int? = null): AlbumItem?
Link copied to clipboard
abstract suspend fun fetchAlbumContent(albumId: Long)
Link copied to clipboard
abstract suspend fun fetchAlbums(userId: Long, types: Set<AlbumType>, coversCount: Int = 1)
Link copied to clipboard
abstract suspend fun getAlbum(albumId: Long): AlbumItem?
Link copied to clipboard
abstract suspend fun getAlbumByBackendId(albumBackendId: String): AlbumItem?
Link copied to clipboard
abstract suspend fun getSectionAlbumPhotos(albumId: Long, range: LongRange): List<MediaItem>

Return a list of PhotoItem from album, selected by time period(range)

Link copied to clipboard
abstract suspend fun getSharedLink(albumId: Long): SharedLinkItem?
Link copied to clipboard
abstract suspend fun openSharedLink(sharedLink: String, password: String?): AlbumItem
Link copied to clipboard
abstract suspend fun updateAlbumMeta(albumId: Long): AlbumItem