[][src]Struct miniflux_api::MinifluxApi

pub struct MinifluxApi { /* fields omitted */ }

Methods

impl MinifluxApi[src]

pub fn new(url: &Url, username: String, password: String) -> Self[src]

Create a new instance of the MinifluxApi.

  • url: url of the hosted Miniflux instance (e.g. https://reader.miniflux.app/)
  • username: user existing on said Miniflux instance
  • password: password of said user

pub async fn discover_subscription<'_, '_>(
    &'_ self,
    url: Url,
    client: &'_ Client
) -> Result<Vec<Feed>, ApiError>
[src]

Try to find all available feeds (RSS/Atom) for a given website url.

  • url: url of a website with possible feeds (e.g. http://example.org)

pub async fn get_feeds<'_, '_>(
    &'_ self,
    client: &'_ Client
) -> Result<Vec<Feed>, ApiError>
[src]

Get all subscribed feeds.

pub async fn get_feed<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<Feed, ApiError>
[src]

Get a specific feed by id.

pub async fn get_feed_icon<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<FavIcon, ApiError>
[src]

Get the FavIcon for a specific feed.

pub async fn create_feed<'_, '_, '_>(
    &'_ self,
    feed_url: &'_ Url,
    category_id: i64,
    client: &'_ Client
) -> Result<i64, ApiError>
[src]

Subscribe to a feed.

  • feed_url: url to a RSS or Atom feed (e.g. http://example.org/feed.atom)
  • category_id: Miniflux internal id of a category the feed should be created in

pub async fn update_feed<'_, '_, '_>(
    &'_ self,
    id: i64,
    title: &'_ str,
    category_id: i64,
    client: &'_ Client
) -> Result<Feed, ApiError>
[src]

Update title and/or move feed to a different category.

  • id: Miniflux internal id of the feed to alter
  • title: new title of the feed
  • category_id: new parent category id

pub async fn refresh_feed_synchronous<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Refresh the contents of a feed synchronous on Miniflux. This operation can block the Miniflux instance for hundrets of milliseconds.

pub async fn delete_feed<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Unsubscribe from a feed.

pub async fn get_feed_entry<'_, '_>(
    &'_ self,
    feed_id: i64,
    entry_id: i64,
    client: &'_ Client
) -> Result<Entry, ApiError>
[src]

Get a single specific entry (= article) from a feed.

pub async fn get_entry<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<Entry, ApiError>
[src]

Get a single specific entry (= article).

pub async fn get_entries<'_, '_>(
    &'_ self,
    status: Option<EntryStatus>,
    offset: Option<i64>,
    limit: Option<i64>,
    order: Option<OrderBy>,
    direction: Option<OrderDirection>,
    before: Option<i64>,
    after: Option<i64>,
    before_entry_id: Option<i64>,
    after_entry_id: Option<i64>,
    starred: Option<bool>,
    client: &'_ Client
) -> Result<Vec<Entry>, ApiError>
[src]

Get a batch of entries (= articles).

pub async fn get_feed_entries<'_, '_>(
    &'_ self,
    id: i64,
    status: Option<EntryStatus>,
    offset: Option<i64>,
    limit: Option<i64>,
    order: Option<OrderBy>,
    direction: Option<OrderDirection>,
    before: Option<i64>,
    after: Option<i64>,
    before_entry_id: Option<i64>,
    after_entry_id: Option<i64>,
    starred: Option<bool>,
    client: &'_ Client
) -> Result<Vec<Entry>, ApiError>
[src]

Get a batch of entries (= articles) from a specific feed. The field comments_url is available since Miniflux v2.0.5.

pub async fn update_entries_status<'_, '_>(
    &'_ self,
    ids: Vec<i64>,
    status: EntryStatus,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Update the read status of a batch of entries (= articles).

pub async fn toggle_bookmark<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Toggle the starred status of an entry (= article)

pub async fn get_categories<'_, '_>(
    &'_ self,
    client: &'_ Client
) -> Result<Vec<Category>, ApiError>
[src]

Get all categories

pub async fn create_category<'_, '_, '_>(
    &'_ self,
    title: &'_ str,
    client: &'_ Client
) -> Result<Category, ApiError>
[src]

Create a new empty category

pub async fn update_category<'_, '_, '_>(
    &'_ self,
    id: i64,
    title: &'_ str,
    client: &'_ Client
) -> Result<Category, ApiError>
[src]

Rename a existing cagegory

pub async fn delete_category<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Delete a existing category

pub async fn export_opml<'_, '_>(
    &'_ self,
    client: &'_ Client
) -> Result<String, ApiError>
[src]

Serialize all categories and subscribed feeds into a OPML string. This API call is available since Miniflux v2.0.1.

pub async fn import_opml<'_, '_, '_>(
    &'_ self,
    opml: &'_ str,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Parse OPML string, create all contained categories and subscribe to all contained feeds. This API call is available since Miniflux v2.0.7.

pub async fn create_user<'_, '_, '_, '_>(
    &'_ self,
    username: &'_ str,
    password: &'_ str,
    is_admin: bool,
    client: &'_ Client
) -> Result<User, ApiError>
[src]

Create a new user on the Miniflux instance. You must be an administrator to create users.

pub async fn update_user<'_, '_>(
    &'_ self,
    id: i64,
    username: Option<String>,
    password: Option<String>,
    is_admin: Option<bool>,
    theme: Option<String>,
    language: Option<String>,
    timezone: Option<String>,
    entry_sorting_direction: Option<String>,
    client: &'_ Client
) -> Result<User, ApiError>
[src]

Update details and/or credentials of a user. You must be an administrator to update users.

pub async fn get_current_user<'_, '_>(
    &'_ self,
    client: &'_ Client
) -> Result<User, ApiError>
[src]

Get the user specified when this struct was created. This API endpoint is available since Miniflux v2.0.8.

pub async fn get_user_by_id<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<User, ApiError>
[src]

Get a specific user of the Miniflux instance. You must be an administrator to fetch users.

pub async fn get_user_by_name<'_, '_, '_>(
    &'_ self,
    username: &'_ str,
    client: &'_ Client
) -> Result<User, ApiError>
[src]

Try to get a user by its username. You must be an administrator to fetch users.

pub async fn delete_user<'_, '_>(
    &'_ self,
    id: i64,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

Delete a user. You must be an administrator to delete users.

pub async fn healthcheck<'_, '_>(
    &'_ self,
    client: &'_ Client
) -> Result<(), ApiError>
[src]

The healthcheck endpoint is useful for monitoring and load-balancer configuration.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.