boB Rudis
5 years ago
26 changed files with 345 additions and 115 deletions
@ -0,0 +1,30 @@ |
|||
#' Global Resource Ids |
|||
#' |
|||
#' @name global_resource_ids |
|||
#' @rdname global_resource_ids |
|||
#' @description The following is a list of built-in categories and tags applications can take advantage of. These ids are not returned by the APIs directly, they must be constructed in code. |
|||
#' @references (<https://developer.feedly.com/cloud/>) |
|||
#' @md |
|||
#' @section Id List: |
|||
#' |
|||
#' - `user/:userId/category/global.all` |
|||
#' All articles from all the feeds the user subscribes to (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.all`) |
|||
#' - `user/:userId/category/global.uncategorized` |
|||
#' All the articles from all the sources the user subscribes to and are not in a category (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.uncategorized`) |
|||
#' - `user/:userId/category/global.must` |
|||
#' Users can promote sources they really love to read to must have (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.must`) |
|||
#' - `user/:userId/tag/global.read’ |
|||
#' List of entries the user has recently read - limited to the feeds the users subscribes to (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.read`) |
|||
#' - `user/:userId/tag/global.saved` |
|||
#' Users can save articles for later. Equivalent of starring articles in Google Reader (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.saved`) |
|||
#' - `user/:userId/tag/global.all` |
|||
#' All articles from all personal tags, including global.saved (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.all`) |
|||
#' - `enterprise/:enterpriseName/category/global.all` |
|||
#' All articles from all team feeds (example: `enterprise/acmeinc/category/global.all`) |
|||
#' - `enterprise/:enterpriseName/tags/global.all` |
|||
#' All articles from all team tags (example: `enterprise/acmeinc/tags/global.all`) |
|||
#' - `user/:userId/category/global.enterprise` |
|||
#' All articles from all the team categories a user is following (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.enterprise`) |
|||
#' - `user/:userId/tag/global.enterprise` |
|||
#' All articles from all the team tags a user is subscribed to (example: `user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.enterprise`) |
|||
NULL |
@ -0,0 +1,24 @@ |
|||
#' Retrieve Your Feedly Profile |
|||
#' |
|||
#' @md |
|||
#' @param feedly_token Your Feedly Developer Access Token (see [feedly_access_token()]) |
|||
#' @references (<https://developer.feedly.com/v3/opml/>) |
|||
#' @export |
|||
feedly_profile <- function(feedly_token = feedly_access_token()) { |
|||
|
|||
httr::GET( |
|||
url = "https://cloud.feedly.com/v3/profile", |
|||
httr::add_headers( |
|||
`Authorization` = sprintf("OAuth %s", feedly_token) |
|||
) |
|||
) -> res |
|||
|
|||
httr::stop_for_status(res) |
|||
|
|||
out <- httr::content(res, as="text") |
|||
|
|||
out <- jsonlite::fromJSON(out) |
|||
|
|||
out |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
# Find feeds based on contents |
|||
# |
|||
# @md |
|||
# @param query a full or partial title string, URL, or `#topic` |
|||
# @param count number of items to return (API default is 20) |
|||
# @param locale if not `NULL` then a Feedly-recognized locale string (see |
|||
# `References`) to provide a hint to the search engine to return feeds |
|||
# in that locale. |
|||
# @param feedly_token Your Feedly Developer Access Token (see [feedly_access_token()]) |
|||
# @references (<https://developer.feedly.com/v3/search/>) & [Search Tutorial](https://feedly.uservoice.com/knowledgebase/articles/441699-power-search-tutorial) |
|||
# @seealso feedly_search_title |
|||
# @return list similar to [feedly_stream()] |
|||
# @examples |
|||
# feedly_search_title("data science") |
|||
# feedly_search_contents <- function(query, count=20L, locale=NULL, feedly_token = feedly_access_token()) { |
|||
# |
|||
# ct <- as.integer(count) |
|||
# |
|||
# query <- query[1] |
|||
# |
|||
# httr::GET( |
|||
# url = "https://cloud.feedly.com/v3/search/feeds", |
|||
# if (!is.null(feedly_token)) { |
|||
# httr::add_headers( |
|||
# `Authorization` = sprintf("OAuth %s", feedly_token) |
|||
# ) |
|||
# }, |
|||
# query = list( |
|||
# query = query, |
|||
# count = ct, |
|||
# locale = locale |
|||
# ) |
|||
# ) -> res |
|||
# |
|||
# httr::stop_for_status(res) |
|||
# |
|||
# out <- httr::content(res, as="text") |
|||
# |
|||
# out <- jsonlite::fromJSON(out) |
|||
# |
|||
# out |
|||
# |
|||
# } |
@ -0,0 +1,28 @@ |
|||
#' Retrieve List of Tags |
|||
#' |
|||
#' This endpoint is useful for retrieving ids of Feedly Boards which would |
|||
#' then enable you to, say, make your own newsletters without upgrading to Teams. |
|||
#' |
|||
#' @md |
|||
#' @param feedly_token Your Feedly Developer Access Token (see [feedly_access_token()]) |
|||
#' @references (<https://developer.feedly.com/v3/tags/>) |
|||
#' @export |
|||
#' @return character or `xml_document` depending on `as` |
|||
feedly_tags <- function(feedly_token = feedly_access_token()) { |
|||
|
|||
httr::GET( |
|||
url = "https://cloud.feedly.com/v3/tags", |
|||
httr::add_headers( |
|||
`Authorization` = sprintf("OAuth %s", feedly_token) |
|||
) |
|||
) -> res |
|||
|
|||
httr::stop_for_status(res) |
|||
|
|||
out <- httr::content(res, as="text") |
|||
|
|||
out <- jsonlite::fromJSON(out) |
|||
|
|||
out |
|||
|
|||
} |
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,17 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/feedly-profile.R |
|||
\name{feedly_profile} |
|||
\alias{feedly_profile} |
|||
\title{Retrieve Your Feedly Profile} |
|||
\usage{ |
|||
feedly_profile(feedly_token = feedly_access_token()) |
|||
} |
|||
\arguments{ |
|||
\item{feedly_token}{Your Feedly Developer Access Token (see \code{\link[=feedly_access_token]{feedly_access_token()}})} |
|||
} |
|||
\description{ |
|||
Retrieve Your Feedly Profile |
|||
} |
|||
\references{ |
|||
(\url{https://developer.feedly.com/v3/opml/}) |
|||
} |
@ -0,0 +1,21 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/feedly-tags.R |
|||
\name{feedly_tags} |
|||
\alias{feedly_tags} |
|||
\title{Retrieve List of Tags} |
|||
\usage{ |
|||
feedly_tags(feedly_token = feedly_access_token()) |
|||
} |
|||
\arguments{ |
|||
\item{feedly_token}{Your Feedly Developer Access Token (see \code{\link[=feedly_access_token]{feedly_access_token()}})} |
|||
} |
|||
\value{ |
|||
character or \code{xml_document} depending on \code{as} |
|||
} |
|||
\description{ |
|||
This endpoint is useful for retrieving ids of Feedly Boards which would |
|||
then enable you to, say, make your own newsletters without upgrading to Teams. |
|||
} |
|||
\references{ |
|||
(\url{https://developer.feedly.com/v3/tags/}) |
|||
} |
@ -0,0 +1,36 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/feedly-global-resource-ids.R |
|||
\name{global_resource_ids} |
|||
\alias{global_resource_ids} |
|||
\title{Global Resource Ids} |
|||
\description{ |
|||
The following is a list of built-in categories and tags applications can take advantage of. These ids are not returned by the APIs directly, they must be constructed in code. |
|||
} |
|||
\section{Id List}{ |
|||
|
|||
\itemize{ |
|||
\item \code{user/:userId/category/global.all} |
|||
All articles from all the feeds the user subscribes to (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.all}) |
|||
\item \code{user/:userId/category/global.uncategorized} |
|||
All the articles from all the sources the user subscribes to and are not in a category (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.uncategorized}) |
|||
\item \code{user/:userId/category/global.must} |
|||
Users can promote sources they really love to read to must have (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.must}) |
|||
\item \code{user/:userId/tag/global.read’ List of entries the user has recently read - limited to the feeds the users subscribes to (example: }user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.read`) |
|||
\item \code{user/:userId/tag/global.saved} |
|||
Users can save articles for later. Equivalent of starring articles in Google Reader (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.saved}) |
|||
\item \code{user/:userId/tag/global.all} |
|||
All articles from all personal tags, including global.saved (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.all}) |
|||
\item \code{enterprise/:enterpriseName/category/global.all} |
|||
All articles from all team feeds (example: \code{enterprise/acmeinc/category/global.all}) |
|||
\item \code{enterprise/:enterpriseName/tags/global.all} |
|||
All articles from all team tags (example: \code{enterprise/acmeinc/tags/global.all}) |
|||
\item \code{user/:userId/category/global.enterprise} |
|||
All articles from all the team categories a user is following (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/global.enterprise}) |
|||
\item \code{user/:userId/tag/global.enterprise} |
|||
All articles from all the team tags a user is subscribed to (example: \code{user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/tag/global.enterprise}) |
|||
} |
|||
} |
|||
|
|||
\references{ |
|||
(\url{https://developer.feedly.com/cloud/}) |
|||
} |
Loading…
Reference in new issue