gotify 0.4.0

Idiomatic client for the Gotify API
Documentation
use reqwest::Method;

use crate::{models::VersionInfo, Client, Result};

impl<T> Client<T> {
    /// Get version information.
    pub async fn version(&self) -> Result<VersionInfo> {
        self.request(Method::GET, ["version"])
            .send_and_read_json()
            .await
    }
}

#[cfg(test)]
mod tests {
    use crate::testsuite::*;

    #[apply(run_test_server!)]
    #[test]
    async fn version() -> eyre::Result<()> {
        unauthenticated_client().version().await?;

        Ok(())
    }
}