Struct dapnet_api::Client
source · [−]pub struct Client { /* private fields */ }
Implementations
sourceimpl Client
impl Client
sourcepub fn new(username: &str, password: &str) -> Self
pub fn new(username: &str, password: &str) -> Self
Creates a new instance of the client with the default configuration.
Example:
use dapnet_api::Client;
let client = Client::new("m0nxn", "my_super_secret_password");
pub async fn get_statistics(&self) -> Result<Option<Statistics>>
pub async fn get_calls_by(&self, owner: &str) -> Result<Option<Vec<Call>>>
sourcepub async fn new_call(&self, call: &Call) -> Result<()>
pub async fn new_call(&self, call: &Call) -> Result<()>
Sends a new call/message.
Example:
client
.new_call(&Call::new(
"M0NXN: this is a test".to_string(),
vec!["m0nxn".to_string()],
vec!["uk-all".to_string()],
))
.await
.unwrap();
pub async fn get_all_nodes(&self) -> Result<Option<Vec<Node>>>
pub async fn get_node(&self, name: &str) -> Result<Option<Node>>
pub async fn get_all_callsigns(&self) -> Result<Option<Vec<Callsign>>>
pub async fn get_callsign(&self, name: &str) -> Result<Option<Callsign>>
pub async fn get_all_transmitters(&self) -> Result<Option<Vec<Transmitter>>>
pub async fn get_transmitter(&self, name: &str) -> Result<Option<Transmitter>>
pub async fn get_all_transmitter_groups(
&self
) -> Result<Option<Vec<TransmitterGroup>>>
pub async fn get_transmitter_group(
&self,
name: &str
) -> Result<Option<TransmitterGroup>>
pub async fn get_all_rubrics(&self) -> Result<Option<Vec<Rubric>>>
pub async fn get_rubric(&self, name: &str) -> Result<Option<Rubric>>
pub async fn get_news(&self, name: &str) -> Result<Option<Vec<News>>>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more