attachment_info: Get Attachment Metadata

View source: R/attachments.R

attachment_infoR Documentation

Get Attachment Metadata

Description

Returns the metadata related to the attachments of a single bug or any single attachment selected by its ID. By default, the R bug tracker is queried.

Usage

attachment_info(
  bug_id,
  attachment_id = NULL,
  obsolete = FALSE,
  patch_only = FALSE,
  base_url = "https://bugs.r-project.org/bugzilla3/rest/bug/"
)

Arguments

bug_id

ID of one bug (numeric or character).

attachment_id

Optional ID of one attachment (numeric or character). If given, bug_id is ignored.

obsolete

Return information about attachments marked as obsolete? A logical flag. Default is FALSE, i.e., drop obsolete attachments. Ignored when attachment_id is given.

patch_only

Only return information about files marked as a patch? A logical flag. Default is FALSE, i.e., include all kinds of attachments. Ignored when attachment_id is given.

base_url

URL to Bugzilla REST API (bug history). Defaults to R Bugzilla.

Value

a tibble, with rows representing attachments and the following columns representing their properties:

bug_id

Bug ID (integer).

id

Attachment ID (integer).

summary

Short description of attachment (character).

file_name

Filename of attachment (character).

size

Size of attachment in bytes (integer).

content_type

MIME type of attachment (character).

creator

Who created it? (character)

creation_time

Date and time of creation (POSIXct).

last_change_time

Date and time of last change (POSIXct).

is_patch

Is it a patch? (logical)

is_obsolete

Is it obsolete? (logical)

is_private

Is it private? (logical)

any_flags

Does the attachment have any flags? (logical)

See Also

attachment_flags

Examples

## Not run: 
att17398b <- attachment_info(17398)
att2326a <- attachment_info(attachment_id = 2326)
identical(att17398b[att17398b$id == 2326, ], att2326a)

## End(Not run)

mvkorpel/bugtractr documentation built on Aug. 31, 2022, 1:16 p.m.