#' @title General Merger News
#' @description Get general merger news
#'
#' @param min_id News ID to get the latest news
#'
#' @importFrom purrr set_names
#' @importFrom lubridate as_datetime
#' @importFrom dplyr mutate
#'
#' @return
#' @export
#'
#' @examples
#' merger_news()
merger_news <- function(min_id = 0, ...){
url <- finnhub_endpoint('merger_news')
retry_get(url,
query = list(token = finnhub_key(),
category = 'merger',
minId = min_id)) %>%
purrr::set_names(c('news_category', 'unixtime', 'headline', 'id',
'image', 'related', 'source', 'summary', 'url')) %>%
dplyr::mutate(date = lubridate::as_datetime(unixtime, tz = finnhub_timezone))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.