R/vote_comment.r

Defines functions vote_comment

Documented in vote_comment

vote_comment <-
function(comment,
         vote = 'up',
         ...){
    if(!"token" %in% names(list(...)))
        stop("This operation can only be performed using an OAuth token.")
    if(!vote %in% c('up', 'down'))
        stop("'vote' can only be 'up' or 'down'")
    out <- imgurPOST(paste0('comment/', comment, '/vote/', vote), ...)
    structure(out, class = 'imgur_basic')
}

Try the imguR package in your browser

Any scripts or data that you put into this service are public.

imguR documentation built on May 2, 2019, 4:02 p.m.