Constructor
new Page(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Configuration options Properties
|
- Source:
Methods
(static) parse(resp) → {Page}
Create a Page object from an API response.
Parameters:
Name | Type | Description |
---|---|---|
resp |
Object | as representing a page in the API |
Returns:
- Type
- Page
getDisplayTitle() → {string}
Retrieve the title that should be displayed to the user
- Source:
Returns:
HTML
- Type
- string
getNamespaceId() → {number}
return namespace id
- Source:
Returns:
namespace Number
- Type
- number
getRevisionId() → {number}
Return the latest revision id for this page
- Source:
Returns:
- Type
- number
getTitle() → {string}
Return prefixed page title
- Source:
Returns:
- Type
- string
inNamespace(namespace) → {boolean}
Determine if current page is in a specified namespace
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string | Name of namespace |
- Source:
Returns:
- Type
- boolean
isMainPage() → {boolean}
Checks whether the current page is the main page
- Source:
Returns:
- Type
- boolean
isWatched() → {boolean}
Checks whether the current page is watched
- Source:
Returns:
- Type
- boolean
isWikiText() → {boolean}
Determines if content model is wikitext
- Source:
Returns:
- Type
- boolean