Constructor
new ConfluenceSdk()
- Source
Methods
(async) createAttachment(pageId, path) → {Promise.<void>}
Create an attachment to a Confluence page from a local file
Name | Type | Description |
---|---|---|
pageId | number | The |
path | string | The |
- Source
- Type:
- Promise.<void>
(async) createPage(page) → {Promise.<RemotePage>}
Create a LocalPage
in Confluence
Name | Type | Description |
---|---|---|
page | LocalPage | The local page to create in Confluence |
- Source
The RemotePage
created
- Type:
- Promise.<RemotePage>
(async) deletePage(id) → {Promise.<void>}
Delete a Confluence page
Name | Type | Description |
---|---|---|
id | number | The |
- Source
- Type:
- Promise.<void>
(async) findPage(title) → {Promise.<(RemotePage|undefined)>}
Find page by title
Name | Type | Description |
---|---|---|
title | string | The page title to find |
- Source
The remote page or undefined
if not found
- Type:
- Promise.<(RemotePage|undefined)>
(async) getChildPages(parentPageId) → {Promise.<Map.<string, RemotePage>>}
Return the children of a Confluence page
Name | Type | Description |
---|---|---|
parentPageId | number | The |
- Source
A Map
of RemotePages
indexed by their path
- Type:
- Promise.<Map.<string, RemotePage>>
pageMeta(page) → {Meta}
Name | Type | Description |
---|---|---|
page | object | Confluence page data |
- Source
A Meta
instance created from the page.metadata
- Type:
- Meta
remotePage(page, parentId) → {RemotePage}
Name | Type | Description |
---|---|---|
page | object | Confluence page data |
parentId | number | The |
- Source
A RemotePage
instance created from the page
data
- Type:
- RemotePage
(async) updatePage(remotePage) → {Promise.<RemotePage>}
Update the content of an existing page.
Name | Type | Description |
---|---|---|
remotePage | RemotePage | The page to be updated |
- Source
The updated RemotePage
- Type:
- Promise.<RemotePage>
validateResponse(response, validStatuses) → {object}
Name | Type | Description |
---|---|---|
response | AxiosResponse | An |
validStatuses | Array.<number> | An array of http statuses to consider successful |
- Source
RequestError
if status
is not successful
The response.data
- Type:
- object