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
- Feed
Tree - Feed Tree
- Feed
Tree Category - Feed Tree Category wraps metadata around lower level feed tree items
- Feed
Tree Item - Feed Tree Item wraps represents the lowest level of item detail, although may contain child items
- Guid
Verbose - Guid structure with version and uid details, along with hash
- Headline
- Single Headline
- Headline
Wrapper - Wraps some metadata around the headlines from get_headlines
- Label
- Labels
- Logged
In - 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.
- Counter
Type - Used in getCounters
- Guid
- Guid
- TTRSSAPI
Error - Update
Article Field - Used in update_article to describe which field to update
- Update
Mode - Used in update_article to describe the mode
- View
Mode - 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.