R/get_reddit_image.r

Defines functions get_reddit_image

Documented in get_reddit_image

get_reddit_image <- 
function(subreddit,
         id,
         ...){
    if(inherits(id, 'imgur_image') || inherits(id, 'imgur_gallery_image'))
        id <- id$id
    out <- imgurGET(paste0('gallery/r/', subreddit, '/', id), ...)
    structure(out, class = 'imgur_gallery_image')
}

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.