Struct mal::MAL [] [src]

pub struct MAL {
    pub username: String,
    pub password: String,
    pub client: 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 MAL
[src]

[src]

Creates a new instance of the MAL struct for interacting with the MyAnimeList API.

If you only need to retrieve the user's anime list, then you do not need to provide a valid password.

[src]

Creates a new instance of the MAL struct for interacting with the MyAnimeList API.

If you only need to retrieve the user's anime list, then you do not need to provide a valid password.

[src]

Searches MyAnimeList for an anime and returns all found results.

Example

use mal::MAL;

let mal = MAL::new("username", "password");
let found = mal.search("Cowboy Bebop").unwrap();

assert!(found.len() > 0);

[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);

[src]

Returns a new AnimeList instance to allow operations on the user's list.

Trait Implementations

impl Debug for MAL
[src]

[src]

Formats the value using the given formatter.