Class XmlBooru

A basic, JSON booru

Example

const Booru = require('booru')
// Aliases are supported
const e9 = Booru('e9')

// You can then search the site
const imgs = await e9.search(['cat', 'cute'], {limit: 3})

// And use the images
imgs.forEach(i => console.log(i.fileUrl))

// Or access other methods on the Booru
e9.postView(imgs[0].id)

Hierarchy (view full)

Constructors

Properties

credentials?: BooruCredentials

The credentials to use for this booru

domain: string

The domain of the booru

site: Site

The site object representing this booru

Methods

  • Protected

    The internal & common searching logic, pls dont use this use .search instead

    Parameters

    • tags: string[]

      The tags to search with

    • searchArgs: default = {}

      The arguments for the search

    Returns Promise<any>

  • Generates a URL to search the booru with, mostly for debugging purposes

    Parameters

    • opt: Partial<SearchUrlParams>

    Returns string

    A URL to search the booru

  • Gets the url you'd see in your browser from a post id for this booru

    Parameters

    • id: string | number

      The id to get the postView for

    Returns string

    The url to the post