R/get_notifications.r

Defines functions get_notifications

Documented in get_notifications

get_notifications <-
function(id = NULL,
         only_new = FALSE,
         ...){
    if(!"token" %in% names(list(...)))
        stop("This operation can only be performed using an OAuth token.")
    if(!is.null(id)) {
        out <- imgurGET(paste0('notification/', id), ...)
    } else {
        out <- imgurGET('notification/', 
                        body = list(new = only_new), ...)
    }
    structure(out, class = 'imgur_notification')
}

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.