Options
All
  • Public
  • Public/Protected
  • All
Menu

A source of photos from reddit

Hierarchy

Index

Constructors

constructor

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

Methods

fetchPhotos

  • fetchPhotos(): Promise<IPhoto[]>

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 Private _getSize

  • _getSize(title: string): object
  • Parse the size from the submission title.

    remarks

    This is the old way reddit did it

    Parameters

    • title: string

      submission title

    Returns object

    IPhoto size

    • height: number
    • width: number

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 processChildren

  • processChildren(children: any[]): IPhoto[]

Generated using TypeDoc