pub async fn new<S>(api_key: S) -> Result<Self>
    where
        S: Into<String>,
    {
        let client = Self::create(api_key);

        client.login_set_token().await?;

        Ok(client)
    }
/// Create a new client and authenticate using the given api key.
///
/// # Errors
/// Will fail if the api key is not valid.
Create a new client and authenticate using the given api key.
Create a new client and authenticate using the given api key .
pub async fn new<S>(api_key: S) -> Result<Self>
    where
        S: Into<String>,
    {
        let client = Self::create(api_key);
        client.login_set_token().await?;
        Ok(client)
    }
pub async fn new < S > ( api_key : S ) -> Result < Self > where S : Into < String > , { let client = Self :: create ( api_key ) ; client . login_set_token ( ) . await ? ; Ok ( client ) }
Create a new client and authenticate using the given api key.
Create a new client and authenticate using the given api key .
api_key
S
api_key
S
errors
Will fail if the api key is not valid.
Will fail if the api key is not valid .