rtweet: send tweets using carbonate outputs

.rtweetR Documentation

send tweets using carbonate outputs

Description

wrapper for post_tweet to send tweets with media created using carbonate.

Usage

.rtweet(self, private, media, status = self$tweet_status,
  media_format = c("png", "gif"), ...)

Arguments

self

carbon self object

private

carbon private object

media

magick-image object or path to image

status

character, status to attach to post, Default: self$tweet_status

media_format

character, type of media to tweet, Default: c('png','gif')

...

arguments to pass to post_tweet

Details

If multiple images are passed they can be either converted to a gif by setting media_format to 'gif' or attached each one to the post.

Value

outcome from rtweet

See Also

image_write post_tweet

Examples

## Not run: 
x <- carbonate::carbon$new()
x$carbonate(code = readLines(system.file('DESCRIPTION',package='carbonate')))
x$carbonate(code = 'x+2')

# using default status value (x$tweet_status)
x$rtweet(system.file('figures/hex_black_small.png',package='carbonate'))

x$rtweet(status = 'these are two pngs',media = x$carbons,media_format='png')
x$rtweet(status = 'this is a gif', media = x$carbons,media_format='gif')


## End(Not run)

carbonate documentation built on Aug. 26, 2022, 9:06 a.m.