An image from a booru with a few common props

Example

Post {
fileUrl: 'https://aaaa.com/image.jpg',
id: '124125',
tags: ['cat', 'cute'],
score: 5,
source: 'https://giraffeduck.com/aaaa.png',
rating: 's'
}

Constructors

Properties

available: boolean

If this post is available (ie. not deleted, not banned, has file url)

booru: BooruClass

The Booru it came from

createdAt?: null | Date

The Date this post was created at

data: any

All the data given by the booru

fileUrl: null | string

The direct link to the file

height: number

The height of the file

id: string

The id of this post

previewHeight: null | number

The height of the smallest image (if available)

previewUrl: null | string

The url to the smallest image (if available)

previewWidth: null | number

The width of the smallest image (if available)

rating: string

The rating of the image, as just the first letter (s/q/e/u) => safe/questionable/explicit/unrated

sampleHeight: null | number

The height of the medium-sized image (if available)

sampleUrl: null | string

The url to the medium-sized image (if available)

sampleWidth: null | number

The width of the medium-sized image (if available)

score: number

The score of this post

source?: string | string[]

The source of this post, if available

tags: string[]

The tags of this post

width: number

The width of the file

Accessors

  • get postView(): string
  • Get the post view (url to the post) of this image

    Returns string

    Example

    const e9 = Booru('e9')
    const imgs = e9.search(['cat', 'dog'])

    // Log the post url of the first image
    console.log(imgs[0].postView)