confl_content: REST Wrapper for the ContentService

Description Usage Arguments Value See Also Examples

Description

REST Wrapper for the ContentService

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
confl_list_pages(
  type = c("page", "blogpost", "comment", "attachment"),
  limit = 10,
  start = 0,
  spaceKey = NULL,
  title = NULL,
  expand = NULL
)

confl_get_page(id, expand = "body.storage")

confl_post_page(
  type = c("page", "blogpost"),
  spaceKey,
  title,
  body,
  ancestors = NULL
)

confl_update_page(id, title, body)

confl_delete_page(id)

Arguments

type

The content type to return. Default value: page. Valid values: page, blogpost.

limit

The limit of the number of items to return, this may be restricted by fixed system limits.

start

The start point of the collection to return.

spaceKey

The space key to find content under.

title

The title of the page to find. Required for page type.

expand

A comma separated list of properties to expand. To refer the nested contents, use periods. (e.g. body.storage,history).

id

ID of the content.

body

The HTML source of the page.

ancestors

The page ID of the parent pages.

Value

The API response as a list.

See Also

https://docs.atlassian.com/ConfluenceServer/rest/latest/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Create a page titled "title1" on a space named "space1"
result <- confl_post_page(
  type = "page",
  spaceKey = "space1",
  title = "title1",
  body = "<h2>example</h2><p>This is example</p>"
)

# Jump to the result page
browseURL(paste0(result$`_links`$base, result$`_links`$webui))

# List pages under space "space1" up to 10 pages
confl_list_pages(spaceKey = "space1")

## End(Not run)

conflr documentation built on April 14, 2020, 7:04 p.m.