pub fn new(instance_url: &str, authentication_data: AuthenticationData) -> Self {
        let auth_token = authentication_data.token.clone();
        Self {
            instance_url: instance_url.to_owned(),
            authentication_data,
            client: Client::new(),
            auth_token,
        }
    }
/// Create a new instance of the struct to interact with the instance API.
///
/// The `instance_url` variable should be the root URL of your Mattermost
/// instance.
///
/// # Example
///
/// ```rust,no_run
/// use mattermost_api::prelude::*;
/// # async fn run() {
/// let auth = AuthenticationData::from_password("you@example.com", "password");
/// let api = Mattermost::new("https://your-mattermost-instance.com", auth);
/// # }
/// ```
Create a new instance of the struct to interact with the instance API.
The `instance_url` variable should be the root URL of your Mattermost
instance.
Create a new instance of the struct to interact with the instance API . The ` instance_url ` variable should be the root URL of your Mattermost instance .
pub fn new(instance_url: &str, authentication_data: AuthenticationData) -> Self {
        let auth_token = authentication_data.token.clone();
        Self {
            instance_url: instance_url.to_owned(),
            authentication_data,
            client: Client::new(),
            auth_token,
        }
    }
pub fn new ( instance_url : & str , authentication_data : AuthenticationData ) -> Self { let auth_token = authentication_data . token . clone ( ) ; Self { instance_url : instance_url . to_owned ( ) , authentication_data , client : Client :: new ( ) , auth_token , } }
Create a new instance of the struct to interact with the instance API.
Create a new instance of the struct to interact with the instance API .
instance_url
&str
authentication_data
AuthenticationData
instance_url
&str
authentication_data
AuthenticationData
example
```rust,no_run
use mattermost_api::prelude::*.
` ` ` rust no_run use mattermost_api :: prelude :: * .
async fn run() {
None
}
None