Nothing
#' Retrieve comments for a URL
#'
#' @param url_id URL or URL ID from VirusTotal
#' @param limit Number of comments to retrieve. Optional.
#' @param cursor String for pagination. Optional.
#' @param \dots Additional arguments passed to \code{\link{virustotal_GET}}.
#'
#' @return list containing URL comments
#'
#' @export
#'
#' @references \url{https://docs.virustotal.com/reference}
#'
#' @seealso \code{\link{set_key}} for setting the API key
#'
#' @examples \dontrun{
#'
#' # Before calling the function, set the API key using set_key('api_key_here')
#'
#' get_url_comments(url_id='http://www.google.com')
#' }
get_url_comments <- function(url_id = NULL, limit = NULL, cursor = NULL, ...) {
assert_character(url_id, len = 1, any.missing = FALSE, min.chars = 1)
# If it looks like a URL, encode it to base64 (VirusTotal v3 requirement)
if (grepl("^https?://", url_id)) {
url_id <- base64encode(charToRaw(url_id))
url_id <- gsub("=+$", "", url_id) # Remove padding
}
res <- virustotal_GET(path = paste0("urls/", url_id, "/comments"),
query = list(limit = limit, cursor = cursor), ...)
res
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.