knitr::opts_chunk$set(message=FALSE, warning=FALSE)
options(width=120)

seymour

Tools to Work with the 'Feedly' 'API'

Description

'Feedly' is a news aggregator application for various web browsers and mobile devices running 'iOS' and 'Android', also available as a cloud-based service. It compiles news feeds from a variety of online sources for the user to customize and share with others. Methods are provided to retrieve information about and contents of 'Feedly' collections and streams.

What's Inside The Tin

The following API functions are implemented:

The following helper functions are available:

The following helper references are available:

Authentication (README)

You need a developer token to access most of the API endpoints. You can do that via links provdied by (https://developer.feedly.com/v3/auth/). There are no plans to support OAuth or token refreshing unless there is sufficient demand via Git[la|hu]b issues & issue votes.

NOT ALL ENDPOINTS REQUIRE AUTHENTICATION

Neither feedly_search_title() nor feedly_stream() require authentication (i.e. you do not need a developer token) to retrieve the contents of the API call. For feedly_stream() You do need to know the Feedly-structured feed id which is (generally) feed/FEED_URL (e.g. feed/http://feeds.feedburner.com/RBloggers).

Installation

devtools::install_github("hrbrmstr/seymour")
options(width=120)

Usage

library(seymour)
library(tidyverse) # mostly for printing

# current verison
packageVersion("seymour")

Collections

coll <- feedly_collections()

filter(coll, title == "R-bloggers") %>% 
  glimpse()

Streams

feedly_stream(
  stream_id = "feed/http://feeds.feedburner.com/RBloggers",
) -> rbloggers

glimpse(rbloggers$items)

rbloggers$items

Feed Metadata

feedly_feed_meta("https://feeds.feedburner.com/rweeklylive") %>% 
  glimpse()

OPML Retrieval

feedly_opml(as = "parsed")

Title Search

rst <- feedly_search_title("data science")
glimpse(rst$results)

Contents Search

rsc <- feedly_search_contents("data science")
glimpse(rsc$results)

API Usage Rate Limit Info

fp <- feedly_profile()
fp[grepl("rate_limit", names(fp))]

Sample Stream Report

fp <- feedly_profile() # get profile to get my id

# use the id to get my "security" category feed
fs <- feedly_stream(sprintf("user/%s/category/security", fp$id))

# get the top 10 items with engagement >= third quartile of all posts
# and don't include duplicates in the report
mutate(fs$items, published = as.Date(published)) %>% 
  filter(published >= as.Date("2018-12-01")) %>%
  filter(engagement > fivenum(engagement)[4]) %>% 
  filter(!is.na(summary_content)) %>% 
  mutate(alt_url = map_chr(alternate, ~.x[[1]])) %>% 
  distinct(alt_url, .keep_all = TRUE) %>% 
  slice(1:10) -> for_report

# render the report
render_stream(
  feedly_stream = for_report, 
  title = "Cybersecurity News", 
  include_visual = TRUE,
  browse = TRUE
)

Click on the following to see the complete render or view the Rmd or HTML in your browser:

Package Code Metrics

cloc::cloc_pkg_md()

Code of Conduct

Please note that the [34m'seymour'[39m project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Image Credit

(c) Can Stock Photo / lineartestpilot



hrbrmstr/seymour documentation built on Jan. 24, 2020, 11:27 a.m.