pub struct NextcloudNewsApi { /* private fields */ }Implementations§
Source§impl NextcloudNewsApi
impl NextcloudNewsApi
Sourcepub fn new(
url: &Url,
username: String,
password: String,
) -> Result<Self, ApiError>
pub fn new( url: &Url, username: String, password: String, ) -> Result<Self, ApiError>
Create a new instance of the NextcloudNewsApi.
url: url of the hosted Nextcloud instance (e.g.https://cloud.test.com/)username: user existing on the Nextcloud instancepassword: password of the user
pub async fn get_version(&self, client: &Client) -> Result<Version, ApiError>
pub async fn get_folders( &self, client: &Client, ) -> Result<Vec<Folder>, ApiError>
pub async fn create_folder( &self, client: &Client, name: &str, ) -> Result<Folder, ApiError>
pub async fn delete_folder( &self, client: &Client, folder_id: i64, ) -> Result<(), ApiError>
pub async fn rename_folder( &self, client: &Client, folder_id: i64, new_name: &str, ) -> Result<(), ApiError>
pub async fn mark_folder( &self, client: &Client, folder_id: i64, newest_item_id: i64, ) -> Result<(), ApiError>
pub async fn get_feeds(&self, client: &Client) -> Result<Vec<Feed>, ApiError>
pub async fn create_feed( &self, client: &Client, url: &str, folder_id: Option<i64>, ) -> Result<Feed, ApiError>
pub async fn delete_feed( &self, client: &Client, feed_id: i64, ) -> Result<(), ApiError>
pub async fn move_feed( &self, client: &Client, feed_id: i64, folder_id: Option<i64>, ) -> Result<(), ApiError>
pub async fn rename_feed( &self, client: &Client, feed_id: i64, new_name: &str, ) -> Result<(), ApiError>
pub async fn mark_feed( &self, client: &Client, feed_id: i64, newest_item_id: i64, ) -> Result<(), ApiError>
pub async fn get_items( &self, client: &Client, batch_size: i64, offset: Option<u64>, item_type: Option<ItemType>, id: Option<u64>, get_read: Option<bool>, oldest_first: Option<bool>, ) -> Result<Vec<Item>, ApiError>
pub async fn get_updated_items( &self, client: &Client, last_modified: u64, item_type: Option<ItemType>, id: Option<u64>, ) -> Result<Vec<Item>, ApiError>
pub async fn mark_item_read( &self, client: &Client, item_id: i64, ) -> Result<(), ApiError>
pub async fn mark_items_read( &self, client: &Client, item_ids: Vec<i64>, ) -> Result<(), ApiError>
pub async fn mark_item_unread( &self, client: &Client, item_id: i64, ) -> Result<(), ApiError>
pub async fn mark_items_unread( &self, client: &Client, item_ids: Vec<i64>, ) -> Result<(), ApiError>
pub async fn mark_item_starred( &self, client: &Client, item_id: i64, ) -> Result<(), ApiError>
pub async fn mark_items_starred( &self, client: &Client, item_ids: Vec<i64>, ) -> Result<(), ApiError>
pub async fn mark_item_unstarred( &self, client: &Client, item_id: i64, ) -> Result<(), ApiError>
pub async fn mark_items_unstarred( &self, client: &Client, item_ids: Vec<i64>, ) -> Result<(), ApiError>
pub async fn mark_all_items_read( &self, client: &Client, newest_item_id: i64, ) -> Result<(), ApiError>
Auto Trait Implementations§
impl Freeze for NextcloudNewsApi
impl RefUnwindSafe for NextcloudNewsApi
impl Send for NextcloudNewsApi
impl Sync for NextcloudNewsApi
impl Unpin for NextcloudNewsApi
impl UnwindSafe for NextcloudNewsApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more