PhotosPlugin

createAlbum

createAlbum(options: PhotosCreateAlbumOptions): Promise<void>
Create an album in the user's photo library
options PhotosCreateAlbumOptions
Returns: Promise<void>

getAlbums

getAlbums(options?: PhotosAlbumsFetchOptions): Promise<PhotosAlbumsResult>
Get albums from the user's photo library
options PhotosAlbumsFetchOptions
Returns: Promise<PhotosAlbumsResult>

getPhotos

getPhotos(options?: PhotosFetchOptions): Promise<PhotosResult>
Get photos from the user's photo library
options PhotosFetchOptions
Returns: Promise<PhotosResult>

savePhoto

savePhoto(options?: PhotosSaveOptions): Promise<PhotosSaveResult>
Save a photo the the user's photo library
options PhotosSaveOptions
Returns: Promise<PhotosSaveResult>
interface PhotosCreateAlbumOptions {
name : string
}
interface PhotosAlbumsFetchOptions {
// Whether to load cloud shared albums
loadShared : boolean
}
interface PhotosAlbumsResult {
// The list of albums returned from the query
albums : undefined
}
interface PhotosFetchOptions {
// Which album identifier to query in (get identifier with getAlbums())
albumIdentifier ?: string
// The number of photos to fetch, sorted by last created date descending
quantity ?: number
// The height of thumbnail to return
thumbnailHeight ?: number
// The quality of thumbnail to return as JPEG (0-100)
thumbnailQuality ?: number
// The width of thumbnail to return
thumbnailWidth ?: number
// Which types of assets to return (currently only supports "photos")
types ?: string
}
interface PhotosResult {
// The list of photos returned from the library
photos : undefined
}
interface PhotosSaveOptions {
// The optional album identifier to save this photo in
albumIdentifier ?: string
// The base64-encoded JPEG data for a photo (note: do not add HTML data-uri type prefix)
data : string
}
interface PhotosSaveResult {
// Whether the photo was created
success : boolean
}