Options
All
  • Public
  • Public/Protected
  • All
Menu

A source of photos from Google Photos

Hierarchy

Index

Constructors

constructor

  • new GoogleSource(useKey: UseKey, photosKey: string, type: Type, desc: string, isLimited: boolean, isDaily: boolean, isArray: boolean, loadArg?: any): GoogleSource

Accessors

Static DEF_FILTER

  • get DEF_FILTER(): object

Static MAX_ALBUMS

  • get MAX_ALBUMS(): number

Static MAX_ALBUM_PHOTOS

  • get MAX_ALBUM_PHOTOS(): number

Static MAX_FILTERED_PHOTOS

  • get MAX_FILTERED_PHOTOS(): number

Static MAX_PHOTOS

  • get MAX_PHOTOS(): number

Static NO_FILTER

  • get NO_FILTER(): object

Methods

fetchPhotos

getDesc

  • getDesc(): string

getLoadArg

  • getLoadArg(): any

getPhotos

getPhotosKey

  • getPhotosKey(): string

getUseKey

isDaily

  • isDaily(): boolean

isLimited

  • isLimited(): boolean

process

  • process(): Promise<undefined>

use

  • use(): null | false | true

Static addPhoto

  • addPhoto(photos: IPhoto[], url: string, author: string, asp: number, ex: any, point?: string): void
  • Add a IPhoto to an existing Array

    Parameters

    • photos: IPhoto[]

      The array to add to

    • url: string

      The url to the photo

    • author: string

      The photographer

    • asp: number

      The aspect ratio of the photo

    • ex: any

      Additional information about the photo

    • Default value point: string = ""

      An optional geolocation

    Returns void

Static createPoint

  • createPoint(lat: number, lon: number): string

Static Private fetchAlbums

Static Private getImageSize

Static isAuthRevokedError

  • isAuthRevokedError(err: Error, name: string): boolean

Static Private isFetch

  • isFetch(): boolean

Static Private isImage

Static loadAlbum

  • loadAlbum(id: string, name: string, interactive?: boolean, notify?: boolean): Promise<IAlbum>
  • Retrieve a Google Photos album

    throws

    An error if the album failed to load.

    Parameters

    • id: string

      Unique Album ID

    • name: string

      Album name

    • Default value interactive: boolean = true
    • Default value notify: boolean = false

    Returns Promise<IAlbum>

    An album

Static loadAlbumList

  • loadAlbumList(): Promise<IAlbum[]>

Static loadAlbums

  • loadAlbums(interactive?: boolean, notify?: boolean): Promise<ISelectedAlbum[]>
  • Reload the saved albums from the Web

    throws

    An error if the albums could not be updated

    Parameters

    • Default value interactive: boolean = false
    • Default value notify: boolean = false

    Returns Promise<ISelectedAlbum[]>

    The array of album selections

Static loadFilteredPhotos

  • loadFilteredPhotos(force?: boolean, notify?: boolean): Promise<IPhoto[]>
  • Load photos based on a filter

    throws

    An error if we could not load the photos

    Parameters

    • Default value force: boolean = false
    • Default value notify: boolean = false

    Returns Promise<IPhoto[]>

    The array of photos

Static loadPhotos

  • loadPhotos(ids: string[]): Promise<IPhoto[]>
  • Load the given array of unique photo id's from Google Photos

    throws

    An error if the photos failed to load

    Parameters

    • ids: string[]

      array of ids

    Returns Promise<IPhoto[]>

    An array of photos

Static Private processPhoto

Static Private processPhotos

Static Private updateAlbumsBaseUrls

  • updateAlbumsBaseUrls(photos: IPhoto[]): Promise<boolean>
  • Update the baseUrls of the given photos in the saved albums

    throws

    An error on failure

    Parameters

    • photos: IPhoto[]

      photos to update

    Returns Promise<boolean>

    false if couldn't persist albumSelections

Static updateBaseUrls

  • updateBaseUrls(photos: IPhoto[]): Promise<boolean>

Static Private updatePhotosBaseUrls

  • updatePhotosBaseUrls(photos: IPhoto[]): Promise<boolean>
  • Update the baseUrls of the given photos in the saved photos

    throws

    An error on failure

    Parameters

    • photos: IPhoto[]

      photos to update

    Returns Promise<boolean>

    false if couldn't persist googleImages

Generated using TypeDoc