gm_save_attachment: Save the attachment to a file

View source: R/gm_message.R

gm_save_attachmentR Documentation

Save the attachment to a file

Description

This is a low level function that only works on attachments retrieved with gm_attachment(). To save an attachment directly from a message see gm_save_attachments(), which is a higher level interface more suitable for most uses.

Usage

gm_save_attachment(x, filename)

Arguments

x

attachment to save

filename

location to save to

See Also

Other message: gm_attachment(), gm_delete_message(), gm_import_message(), gm_insert_message(), gm_messages(), gm_message(), gm_modify_message(), gm_save_attachments(), gm_send_message(), gm_trash_message(), gm_untrash_message()

Examples

## Not run: 
my_attachment <- gm_attachment("a32e324b", "12345")
# save attachment to a file
gm_save_attachment(my_attachment, "photo.jpg")

## End(Not run)

r-lib/gmailr documentation built on Nov. 5, 2023, 6:22 a.m.