📰 R wrapper for the webhose.io API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vs
R
docs
man
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
README.md
_pkgdown.yml
index.Rmd

README.md

Travis-CI Build Status

webhoser

An R wrapper to the webhose.io API.

Install

devtools::install_github("JohnCoene/webhoser")

Functions

  • wh_token - Setup token (see webhose.io)
  • wh_news - Get news
  • wh_broadcasts - Get broadcast transcripts
  • wh_paginate - paginate
  • wh_collect - collect results
  • wh_date - format dates returned

Examples

token <- wh_token("xXX-x0X0xX0X-00X") # setup token

# webhoser object
token %>% 
  wh_news(q = '"R programming language" is_first:true language:english site_type:news') -> news

# basic
# collect results
token %>% 
  wh_news(q = '"R programming language"') %>% # get news
  wh_collect -> basic
  
# flatten results
token %>% 
  wh_news(q = '"R programming language" OR rstats') %>% # get news
  wh_collect(TRUE) -> flat  # flatten results

# get three pages on the rstats
# format dates
token %>%  
  wh_news(q = '"R programming language" OR rstats') %>% 
  wh_paginate(3) %>% 
  wh_collect() %>% 
  dplyr::mutate(published = wh_date(published)) -> wef