Struct mal::MAL [] [src]

pub struct MAL<'a> {
    pub username: String,
    pub password: String,
    pub client: Cow<'a, Client>,
}

Used to interact with the MyAnimeList API with authorization being handled automatically.

Fields

The user's name on MyAnimeList.

The user's password on MyAnimeList.

The client used to send requests to the API.

Methods

impl<'a> MAL<'a>
[src]

[src]

Creates a new instance of the MAL struct for interacting with the MyAnimeList API. If you only need to retrieve the entries from a user's list, then you do not need to provide a valid password.

This function will create a new reqwest Client to send requests to MyAnimeList. If you already have a Client that you only need to make synchronous requests with and that will live as long as MAL, then you should call with_client instead with Cow::Borrowed.

[src]

Creates a new instance of the MAL struct for interacting with the MyAnimeList API. If you only need to retrieve the entries from a user's list, then you do not need to provide a valid password.

[src]

Returns a new List instance to perform anime list operations.

[src]

Returns a new List instance to perform manga list operations.

[src]

Returns true if the provided account credentials are correct.

Examples

use mal::MAL;

// Create a new MAL instance
let mal = MAL::new("username", "password");

// Verify that the username and password are valid
let valid = mal.verify_credentials().unwrap();

assert_eq!(valid, false);

Trait Implementations

impl<'a> Clone for MAL<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for MAL<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq for MAL<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

Auto Trait Implementations

impl<'a> Send for MAL<'a>

impl<'a> Sync for MAL<'a>