knitr::opts_chunk$set(message=FALSE, warning=FALSE) options(width=120)
Tools to Work with the 'Feedly' 'API'
'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.
The following API functions are implemented:
feedly_access_token
: Retrieve the Feedly Developer Tokenfeedly_collections
: Retrieve Feedly Connectionsfeedly_categories
: Show Feedly Categoriesfeedly_entry
: Get a single entry by idfeedly_enterprise_profile
: Retrieve Your Feedly Enterprise Profilefeedly_feed_meta
: Retrieve Metadata for a Feedfeedly_opml
: Retrieve Your Feedly OPML Filefeedly_profile
: Retrieve Your Feedly Profilefeedly_refresh_token
: Generate a Feedly Refresh Tokenfeedly_search_contents
: Search content of a streamfeedly_search_title
: Find feeds based on title, url or '#topic'feedly_stream
: Retrieve contents of a Feedly "stream"feedly_subscribe
: Subscribe to an RSS feedfeedly_subscriptions
: Retrieve Feedly Subscriptionsfeedly_tags
: Retrieve List of TagsThe following helper functions are available:
feedly_continue
: Helper function to iterate through a feedly_stream()
result setrender_stream
: Render a Feedly Stream Data Frame to R MarkdownThe following helper references are available:
global_resource_ids
: Global Resource Ids Helper ReferenceYou 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.
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
).
devtools::install_github("hrbrmstr/seymour")
options(width=120)
library(seymour) library(tidyverse) # mostly for printing # current verison packageVersion("seymour")
coll <- feedly_collections() filter(coll, title == "R-bloggers") %>% glimpse()
feedly_stream( stream_id = "feed/http://feeds.feedburner.com/RBloggers", ) -> rbloggers glimpse(rbloggers$items) rbloggers$items
feedly_feed_meta("https://feeds.feedburner.com/rweeklylive") %>% glimpse()
feedly_opml(as = "parsed")
rst <- feedly_search_title("data science") glimpse(rst$results)
rsc <- feedly_search_contents("data science") glimpse(rsc$results)
fp <- feedly_profile() fp[grepl("rate_limit", names(fp))]
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:
cloc::cloc_pkg_md()
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.
(c) Can Stock Photo / lineartestpilot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.