login

Function login 

Source
pub async fn login(
    client: &ItchClient,
    username: &str,
    password: &str,
    recaptcha_response: Option<&str>,
) -> Result<LoginResponse, ItchRequestJSONError<LoginResponseError>>
Expand description

Login to itch.io

Retrieve a API key from a username and password authentication

§Arguments

  • username - The username OR email of the accout to log in with

  • password - The password of the accout to log in with

  • recaptcha_response - If required, the reCAPTCHA token from https://itch.io/captcha

  • totp_code - If required, The 6-digit code returned by the TOTP application

§Returns

A LoginResponse enum with the response from the API, which can be either the API key or an error

§Errors

If the requests fail