Options
All
  • Public
  • Public/Protected
  • All
Menu

zen-bridge

Index

Type aliases

Any

Type compatibile with any Query interface

comparerCallback

comparerCallback: function

Describes a function that test elements of BooruResult.data for uniqueness. See one of the builtInComparers for an example.

param

current: The current element being tested

param

data: The array to test against

returns

True if the element is unique

Type declaration

    • (current: T, data: T[]): boolean
    • Parameters

      • current: T
      • data: T[]

      Returns boolean

range

range: [number | undefined, number | undefined]

rating

rating: "safe" | "questionable" | "explicit"

Variables

Const b

b: Moebooru = new Moebooru('http://konachan.net')

Const bridge

bridge: ZenBridge = new ZenBridge([db, kc])

Const db

db: Danbooru2 = new Danbooru2('https://danbooru.donmai.us')

Const kc

kc: Moebooru = new Moebooru('http://konachan.net')

Functions

convertRating

  • convertRating(postRating: string, form?: string): rating
  • Converts various representations of post ratings to the ZenBridge rating type

    Parameters

    • postRating: string

      Post rating received from booru

    • Default value form: string = "char"

      Form of the rating

    Returns rating

convertXml

  • convertXml(xml: string): Promise<any>
  • Converts a XML-based booru API response to an object

    Parameters

    • xml: string

      XML data to convert

    Returns Promise<any>

dataFetcher

  • dataFetcher(base: string, path: string, xml?: boolean, config?: object): Promise<any>
  • Parameters

    • base: string
    • path: string
    • Default value xml: boolean = false
    • Default value config: object = {}

    Returns Promise<any>

login

  • login(): void

Object literals

Const Danbooru2Converter

Danbooru2Converter: object

artist

comment

note

  • note(data: any): Note

pool

  • pool(data: any): Pool

post

  • post(data: any): Post

user

  • user(data: any): User

wiki

  • wiki(data: any): Wiki

Const Danbooru2UriBuilder

Danbooru2UriBuilder: object

artist

  • artist(id: number): string

artists

comment

  • comment(id: number): string

comments

favorite

  • favorite(id: number): string

note

  • note(id: number): string

notes

  • notes(query: Notes): string

pool

  • pool(id: number): string

pools

  • pools(query: Pools): string

post

  • post(id: number): string

posts

  • posts(query: Posts): string

unfavorite

  • unfavorite(id: number): string

user

  • user(id: number): string

users

  • users(query: Users): string

wiki

  • wiki(id: number): string

wikis

  • wikis(query: Wikis): string

Const MoebooruConverter

MoebooruConverter: object

artist

comment

note

  • note(data: any): Note

pool

  • pool(data: any): Pool

post

  • post(__namedParameters: object): Post

user

  • user(data: any): User

wiki

  • wiki(data: any): Wiki

Const MoebooruUriBuilder

MoebooruUriBuilder: object

artists

comment

  • comment(id: number): string

comments

notes

  • notes(query: Notes): string

pool

  • pool(id: number): string

pools

  • pools(query: Pools): string

post

  • post(id: number): string

posts

  • posts(query: Posts): string

user

  • user(id: number): string

users

  • users(query: Users): string

vote

  • vote(id: number, score: number): string

wikis

  • wikis(query: Wikis): string

Generated using TypeDoc