rt_ticket_attachment_content: Get the content of an attachment

Description Usage Arguments Value Examples

View source: R/rt_ticket_attachment_content.R

Description

Gets the content of the specified attachment for further processing or manipulation. You'll almost always want to call a second function like content to make the content of the attachment usable from R.

Usage

1
rt_ticket_attachment_content(ticket_id, attachment_id, ...)

Arguments

ticket_id

(numeric) The ticket identifier

attachment_id

(numeric) The attachment identifier

...

Other arguments passed to rt_GET

Value

(rt_api) An rt_api object with the response

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# First, get the attachment content which gives is the raw response
att <- rt_ticket_attachment_content(2, 1)

# Then process it directly in R
httr::content(att)

# Or write it to disk
out_path <- tempfile()
writeBin(httr::content(x, as = 'raw'), out_path)

## End(Not run)

rt documentation built on April 28, 2020, 1:08 a.m.