Crate ttrss_api

Source
Expand description

This crate provides an API on top of TinyTinyRSS

§Usage

Add this to your Cargo.toml:

[dependencies]
ttrss_api = "0.0.1"

Then add this to your crate:

extern crate ttrss_api;

To use:

fn main() {
    let apilevel: Option<ApiLevel> = match get_api_level().expect("Failed to get response").content {
        Content::GetApiLevel(x) => { Some(x) },
        _ => None,
    };
    println!("api level {:?}", apilevel.unwrap());

Structs§

ApiError
Error response returned from API
ApiLevel
API Level
Attachment
Attachment
Category
Categories
Config
Config
Counter
Counter
Feed
Feed
FeedTree
Feed Tree
FeedTreeCategory
Feed Tree Category wraps metadata around lower level feed tree items
FeedTreeItem
Feed Tree Item wraps represents the lowest level of item detail, although may contain child items
GuidVerbose
Guid structure with version and uid details, along with hash
Headline
Single Headline
HeadlineWrapper
Wraps some metadata around the headlines from get_headlines
Label
Labels
LoggedIn
Logged In
Login
Login
Preference
Preference
Response
TTRSS responses are wrapped around a seq and status, with the details per the API call within the content field. This object represents that wrapper.
Status
Status
Unread
Unread
Version
Version

Enums§

Content
Represents the various types of responese from the TTRSS API. The user is expected to inspect the enum for the appropriate type.
CounterType
Used in getCounters
Guid
Guid
TTRSSAPIError
UpdateArticleField
Used in update_article to describe which field to update
UpdateMode
Used in update_article to describe the mode
ViewMode
used in get_headlines to filter describe how to filter headlines

Functions§

catchup_feed
Catchup feed.
get_api_level
Get API level.
get_article
Get article ID’s contents.
get_categories
Get list of categories.
get_config
Get configruration.
get_counters
Get counters.
get_feed_tree
Create tree of all feeds’ and related info.
get_feeds
Get list of feeds.
get_headlines
Get list of headlines.
get_labels
Get all labels.
get_pref
Return one preference value.
get_unread
Get unread feeds.
get_version
Get API version.
is_logged_in
Is the session ID logged in?
login
Login to TTRSS. This will automatically happen if the API call requires a session ID
logout
Logout of the session.
request_from_api
Internal call to generalize communication to TTRSS’ API among multiple API calls
set_article_label
Set an article’s label.
share_to_published
Share information to published feed.
subscribe_to_feed
Subscribe to a feed.
unsubscribe_feed
Unsubscribe to a feed.
update_article
Update an article.
update_feed
Update the feed.