Crate mal [−] [src]
The purpose of this library is to provide high-level access to the MyAnimeList API. It allows you to search for anime / manga, as well as add, update, delete, and read anime / manga from a user's list.
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::anime::{AnimeEntry, WatchStatus}; // Create a new MAL instance let mal = MAL::new("username", "password"); // Search for "Toradora" on MyAnimeList let mut search_results = mal.search_anime("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(WatchStatus::Watching); // 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. |
Structs
MAL |
Used to interact with the MyAnimeList API with authorization being handled automatically. |
Enums
MALError |