Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Page

Light but immensely hacky wrapper around Morebits.wiki.page that presets the change tags and promisifies the core methods.

Hierarchy

  • page
    • Page

Index

Constructors

constructor

  • new Page(title: string, status?: string | status): Page
  • Parameters

    • title: string
    • Optional status: string | status

    Returns Page

Methods

append

  • append(): Promise<api, any, any>
  • Returns Promise<api, any, any>

canEdit

  • canEdit(): boolean

deletePage

  • deletePage(): Promise<api, any, any>
  • Returns Promise<api, any, any>

exists

  • exists(): boolean

getCallbackParameters

  • getCallbackParameters(): any
  • deprecated

    Returns any

getContentModel

  • getContentModel(): string

getCreationTimestamp

  • getCreationTimestamp(): string

getCreator

  • getCreator(): string

getCurrentID

  • getCurrentID(): string

getLastEditTime

  • getLastEditTime(): string

getLoadTime

  • getLoadTime(): string

getPageID

  • getPageID(): string

getPageName

  • getPageName(): string

getPageText

  • getPageText(): string

getRevisionUser

  • getRevisionUser(): string

getStatusElement

  • getStatusElement(): status

load

  • load(): Promise<api, any, any>
  • Returns Promise<api, any, any>

lookupCreation

  • lookupCreation(): Promise<api, any, any>
  • Returns Promise<api, any, any>

move

  • move(onSuccess?: (pageobj: page) => void, onFailure?: (pageobj: page) => void): void
  • Parameters

    • Optional onSuccess: (pageobj: page) => void
        • (pageobj: page): void
        • Parameters

          • pageobj: page

          Returns void

    • Optional onFailure: (pageobj: page) => void
        • (pageobj: page): void
        • Parameters

          • pageobj: page

          Returns void

    Returns void

newSection

  • newSection(): Promise<api, any, any>
  • Returns Promise<api, any, any>

patrol

  • patrol(): void

prepend

  • prepend(): Promise<api, any, any>
  • Returns Promise<api, any, any>

protect

  • protect(): Promise<api, any, any>
  • Returns Promise<api, any, any>

revert

  • revert(onSuccess?: (pageobj: page) => void, onFailure?: (pageobj: page) => void): void
  • Parameters

    • Optional onSuccess: (pageobj: page) => void
        • (pageobj: page): void
        • Parameters

          • pageobj: page

          Returns void

    • Optional onFailure: (pageobj: page) => void
        • (pageobj: page): void
        • Parameters

          • pageobj: page

          Returns void

    Returns void

save

  • save(): Promise<api, any, any>
  • Returns Promise<api, any, any>

setAppendText

  • setAppendText(appendText: string): void
  • Parameters

    • appendText: string

    Returns void

setBotEdit

  • setBotEdit(botEdit: boolean): void
  • Parameters

    • botEdit: boolean

    Returns void

setCallbackParameters

  • setCallbackParameters(callbackParameters: any): any
  • deprecated

    Parameters

    • callbackParameters: any

    Returns any

setCascadingProtection

  • setCascadingProtection(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

setChangeTags

  • setChangeTags(tags: string | string[]): void
  • Parameters

    • tags: string | string[]

    Returns void

setCreateOption

  • setCreateOption(createOption: string): void
  • Parameters

    • createOption: string

    Returns void

setCreateProtection

  • setCreateProtection(level: string, expiry: string): void
  • Parameters

    • level: string
    • expiry: string

    Returns void

setEditProtection

  • setEditProtection(level: string, expiry: string): void
  • Parameters

    • level: string
    • expiry: string

    Returns void

setEditSummary

  • setEditSummary(summary: string): void
  • Parameters

    • summary: string

    Returns void

setFlaggedRevs

  • setFlaggedRevs(level: string, expiry: string): any
  • Parameters

    • level: string
    • expiry: string

    Returns any

setFollowRedirect

  • setFollowRedirect(followRedirect: boolean, followCrossNsRedirect?: boolean): void
  • Parameters

    • followRedirect: boolean
    • Optional followCrossNsRedirect: boolean

    Returns void

setLookupNonRedirectCreator

  • setLookupNonRedirectCreator(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

setMaxConflictRetries

  • setMaxConflictRetries(maxConflictRetries: number): void
  • Parameters

    • maxConflictRetries: number

    Returns void

setMaxRetries

  • setMaxRetries(maxRetries: number): void
  • Parameters

    • maxRetries: number

    Returns void

setMinorEdit

  • setMinorEdit(minorEdit: boolean): void
  • Parameters

    • minorEdit: boolean

    Returns void

setMoveDestination

  • setMoveDestination(destination: string): void
  • Parameters

    • destination: string

    Returns void

setMoveProtection

  • setMoveProtection(level: string, expiry: string): void
  • Parameters

    • level: string
    • expiry: string

    Returns void

setMoveSubpages

  • setMoveSubpages(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

setMoveSuppressRedirect

  • setMoveSuppressRedirect(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

setMoveTalkPage

  • setMoveTalkPage(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

setNewSectionText

  • setNewSectionText(newSectionText: string): void
  • Parameters

    • newSectionText: string

    Returns void

setNewSectionTitle

  • setNewSectionTitle(newSectionTitle: string): void
  • Parameters

    • newSectionTitle: string

    Returns void

setOldID

  • setOldID(oldID: string): void
  • Parameters

    • oldID: string

    Returns void

setPageSection

  • setPageSection(pageSection: number): void
  • Parameters

    • pageSection: number

    Returns void

setPageText

  • setPageText(pageText: string): void
  • Parameters

    • pageText: string

    Returns void

setPrependText

  • setPrependText(prependText: string): void
  • Parameters

    • prependText: string

    Returns void

setStatusElement

  • setStatusElement(statusElement: status): void
  • Parameters

    • statusElement: status

    Returns void

setWatchlist

  • setWatchlist(watchlistOption: string): void
  • Parameters

    • watchlistOption: string

    Returns void

setWatchlistExpiry

  • setWatchlistExpiry(watchlistExpiry: string): void
  • Parameters

    • watchlistExpiry: string

    Returns void

setWatchlistFromPreferences

  • setWatchlistFromPreferences(watchlistOption: string): void
  • Parameters

    • watchlistOption: string

    Returns void

stabilize

  • stabilize(): Promise<api, any, any>
  • Returns Promise<api, any, any>

suppressProtectWarning

  • suppressProtectWarning(): void

triage

  • triage(): void

undeletePage

  • undeletePage(): Promise<api, any, any>
  • Returns Promise<api, any, any>

Generated using TypeDoc