Skip to content

news-r/webhoser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

webhoser

An R wrapper to the webhose.io API.

Install

# install.packages("remotes")
remotes::install_github("news-r/webhoser")

Functions

  • wh_token - Setup token (see webhose.io)
  • wh_news - Get news
  • wh_reviews - Get reviews
  • wh_broadcasts - Get broadcast transcripts no longer available
  • wh_paginate - Paginate
  • wh_collect - Collect results
  • wh_date - Format dates returned

Setup

  1. Visit webhose.io
  2. Visit your dashboard.
  3. Use the "Active API Key" at the bottom with wh_token.

Examples

Visit the website for a more thorough example.

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

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

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

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

Releases

No releases published

Packages

No packages published

Languages