Crate mal [−] [src]
The purpose of this library is to provide high-level access to the MyAnimeList API. It allows you to add, update, delete, read, and search for anime / manga from a user's list, as well as verify user credentials.
All operations are centered around the MAL
struct, as it stores the user credentials
required to perform most operations on the API.
Please keep in mind that the API is rate limited to around ~5 requests per minute. If you send too many requests, the caller's IP will be banned for ~1-2 hours and all requests will return a 403 (Forbidden) status code.
Examples
use mal::MAL; use mal::list::Status; use mal::list::anime::AnimeEntry; // Create a new MAL instance let mal = MAL::new("username", "password"); // Search for "Toradora" on MyAnimeList let mut search_results = mal.anime_list().search_for("Toradora").unwrap(); // Use the first result's info let toradora_info = search_results.swap_remove(0); // Create a new anime list entry with Toradora's info let mut entry = AnimeEntry::new(toradora_info); // Set the entry's watched episodes to 5 and status to watching entry.values .set_watched_episodes(5) .set_status(Status::WatchingOrReading); // Add the entry to the user's anime list mal.anime_list().add(&mut entry).unwrap();
Modules
list |
This module provides generic functionality for adding, updating, deleting, and reading entries from a user's anime / manga list, as well as searching for an anime / manga series. |
Structs
MAL |
Used to interact with the MyAnimeList API with authorization being handled automatically. |
Enums
MALError |