Options
All
  • Public
  • Public/Protected
  • All
Menu

External module Index

Index

References

BooruClass

Renames and re-exports Booru

BooruError

Re-exports BooruError

forSite

Renames and re-exports booruForSite

resolveSite

Re-exports resolveSite

sites

Re-exports sites

Variables

Const booruCache

booruCache: SMap<Booru>

Const deprecatedCommonfy

deprecatedCommonfy: (Anonymous function) = deprecate(() => { },'Common is now deprecated, just access the properties directly')

Functions

booruForSite

  • booruForSite(site: string, credentials?: any): Booru
  • Create a new booru to search with

    constructor

    Parameters

    • site: string

      The Site domain (or alias of it) to create a booru from

    • Default value credentials: any = null

      The credentials to use on this booru

    Returns Booru

    A booru to use

booruFrom

  • booruFrom(booruSite: Site, credentials?: any): Booru
  • Create a new booru, if special type, use that booru, else use default Booru

    Parameters

    • booruSite: Site

      The site to use

    • Optional credentials: any

      The credentials to use, if any

    Returns Booru

    A new booru

commonfy

  • commonfy(images: Post[]): Promise<Post[]>
  • Deprecated, now a noop

    This will be removed *soon* please stop using it

    Just access <Post>.prop, no need to commonfy anymore

    deprecated

    Just use <Post>.prop instead

    Parameters

    Returns Promise<Post[]>

    Array of Post objects

search

  • search(site: string, tags?: string[] | string, __namedParameters?: { credentials: any; limit: number; page: number; random: boolean }): Promise<SearchResults>
  • Searches a site for images with tags and returns the results

    example
    const Booru = require('booru')
    // Returns a promise with the latest cute glace pic from e926
    Booru.search('e926', ['glaceon', 'cute'])

    Parameters

    • site: string

      The site to search

    • Default value tags: string[] | string = []
    • Default value __namedParameters: { credentials: any; limit: number; page: number; random: boolean } = {}
      • credentials: any
      • limit: number
      • page: number
      • random: boolean

    Returns Promise<SearchResults>

    A promise with the images as an array of objects

Object literals

Const BooruTypes

BooruTypes: object

derpi

derpi: Derpibooru = Derpibooru

xml

xml: XmlBooru = XmlBooru

Generated using TypeDoc