pub struct SyncGotify<'a> { /* private fields */ }
Expand description
Synchronous interface to the Gotify API.
Implementations§
Source§impl<'a> SyncGotify<'a>
impl<'a> SyncGotify<'a>
pub fn new( base_url: &'a str, app_token: Option<&'a str>, client_token: Option<&'a str>, ) -> Self
pub fn from(gotify: Gotify<'a>) -> Self
pub fn applications(&self) -> Result<Vec<Application>>
pub fn create_application( &self, name: String, description: String, ) -> Result<Application>
pub fn update_application( &self, id: i32, name: String, description: Option<String>, ) -> Result<Application>
pub fn delete_application(&self, id: i32) -> Result<()>
pub fn upload_application_image( &self, id: i32, image: File, ) -> Result<Application>
pub fn get_messages( &self, app_id: Option<i32>, limit: Option<i32>, since: Option<i32>, ) -> Result<PagedMessages>
pub fn create_message( &self, message: String, priority: Option<i32>, title: Option<String>, ) -> Result<Message>
pub fn delete_messages(&self, app_id: Option<i32>) -> Result<()>
pub fn delete_message(&self, msg_id: i32) -> Result<()>
pub fn get_clients(&self) -> Result<Vec<Client>>
pub fn create_client(&self, name: String) -> Result<Client>
pub fn update_client(&self, id: i32, name: String) -> Result<Client>
pub fn delete_client(&self, id: i32) -> Result<()>
pub fn get_current_user(&self) -> Result<User>
pub fn set_password(&self, passwd: String) -> Result<()>
pub fn get_users(&self) -> Result<Vec<User>>
pub fn create_user( &self, name: String, passwd: String, admin: Option<bool>, ) -> Result<User>
pub fn get_user(&self, id: i32) -> Result<User>
pub fn update_user( &self, id: i32, name: Option<String>, passwd: Option<String>, admin: Option<bool>, ) -> Result<User>
pub fn delete_user(&self, id: i32) -> Result<()>
pub fn get_health(&self) -> Result<Health>
pub fn get_plugins(&self) -> Result<Vec<PluginConf>>
pub fn get_plugin_config(&self, id: i32) -> Result<PluginConf>
Sourcepub fn disable_plugin(&self, id: i32) -> Result<()>
pub fn disable_plugin(&self, id: i32) -> Result<()>
TODO(ethanhs): Figure out what this looks like
pub fn get_plugin_display(&self, id: i32) -> Result<String>
pub fn enable_plugin(&self, id: i32) -> Result<()>
pub fn get_version(&self) -> Result<VersionInfo>
Auto Trait Implementations§
impl<'a> Freeze for SyncGotify<'a>
impl<'a> !RefUnwindSafe for SyncGotify<'a>
impl<'a> Send for SyncGotify<'a>
impl<'a> Sync for SyncGotify<'a>
impl<'a> Unpin for SyncGotify<'a>
impl<'a> !UnwindSafe for SyncGotify<'a>
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