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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more