Struct feedly_api::FeedlyApi

source ·
pub struct FeedlyApi { /* private fields */ }

Implementations§

Create a new FeedlyApi instance

  • client_id: identifies the client making requests to feedly
  • client_secret: issued by feedly staff together with client_id
  • access_token: access token received after sucessfull oauth process
  • refresh_token: received together with access_token, used to refresh it when expired
  • token_expires: point in time when access_token expires and has to refreshed

Generate OAuth login URL.

Parse the redirected URL after login via OAuth. Returns the AuthCode needed to continue with the login process.

Base URL of the desired redirect URL. Will contain the AuthCode and can be fed into parse_redirected_url.

Will fetch the user id from feedly if not already done so.

Parse expiration date of access_token to rust NaiveDateTime.

Generate a feedly feed id from a feed URL (not a website URL).

Generate a category id based on its name and the user id.

Generate a tag id based on its name and the user id.

The id of the global all tag of feedly.

The id of the global saved tag of feedly (starred articles).

The id of the global read tag of feedly.

Generate a access_token from the AuthCode parsed from the redirect URL after successful OAuth.

Refresh the access_token after it expired.

Also updates existing subscriptions.

Same as add_subscription but update multiple subscriptions at once.

source

pub async fn tag_entry(
    &self,
    entry_id: &str,
    tag_ids: Vec<&str>,
    client: &Client
) -> Result<(), ApiError>

Add a tag to an entry (also used to mark entries as read or starred etc.).

Same as tag_entry but for multiple entries at once.

source

pub async fn create_entry(
    &self,
    entry: Entry,
    client: &Client
) -> Result<Vec<String>, ApiError>

Search the feedly cloud for new feeds to subscribe to

Arguments
  • client - reqwest::Client
  • query - Can be a feed url, a site title, a site url or a #topic.
  • count - Number of results. Default value is 20.
  • locale - Locale hint for the search engine to return feeds in that localse (e.g. “pt”, “fr_FR”).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more