Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Api

Wrapper around Morebits.wiki.api that preset the commonly used API parameters and sets the correct user agent

Hierarchy

  • api
    • Api

Index

Constructors

constructor

  • new Api(currentAction: string, query: Record<string, any>, statusElement?: status): Api
  • Parameters

    • currentAction: string
    • query: Record<string, any>
    • Optional statusElement: status

    Returns Api

Properties

params

params: any

responseXML

responseXML: XMLDocument
deprecated

Methods

getErrorCode

  • getErrorCode(): string

getErrorText

  • getErrorText(): string

getResponse

  • getResponse(): any

getStatusElement

  • getStatusElement(): status

getXML

  • getXML(): XMLDocument

post

  • post(ajaxParameters?: AjaxSettings<any>): Promise<api, any, any>
  • Parameters

    • Optional ajaxParameters: AjaxSettings<any>

    Returns Promise<api, any, any>

setParent

  • setParent(parent: any): void
  • Parameters

    • parent: any

    Returns void

setStatusElement

  • setStatusElement(statusElement: status): void
  • Parameters

    • statusElement: status

    Returns void

Static getToken

  • getToken(): Promise<string, any, any>

Static setApiUserAgent

  • setApiUserAgent(ua: string): void
  • Parameters

    • ua: string

    Returns void

Generated using TypeDoc