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

.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

Value

outcome from rtweet

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.

See also

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')

# }