KawaiiKinetics is a Rust API built with Axum and Shuttle, utilizing the Aniscraper library for scraping anime-related content. This API provides various endpoints to retrieve information about anime, including trending series, episode details, and more.
- Anime Information Retrieval: Get details on various anime, including home info, specific anime info, episode listings, and more.
- Caching: Utilizes caching for better performance.
- Secret Management: Securely handles configuration and secrets using a dedicated secret store.
- Rust (1.50 or later)
- Cargo
- An instance of Shuttle for deployment (if needed)
-
Clone the repository:
git clone https://github.com/0xSSOMPW/KawaiiKinetics.git cd KawaiiKinetics
-
Run the application:
cargo run
Set up your secret configuration in your environment. The following keys are required:
MAX_RETRIES_ATTEMPTS
REQWEST_ERROR_WEBHOOK
NO_PROXIES_AVAILABLE_ERROR_WEBHOOK
FAILED_TO_FETCH_AFTER_RETRIES_ERROR_WEBHOOK
UTILS_ERROR_WEBHOOK
UNKNOWN_ERROR_WEBHOOK
HTTP_URL
SOCK4_URL
SOCK5_URL
HIANIME_DOMAINS
USER_AGENT_HEADER
// REQUIREDACCEPT_ENCODING_HEADER
// REQUIREDACCEPT_HEADER
// REQUIRED
These secrets will be loaded into the application at runtime.
- Endpoint:
GET /hianime/home
- Returns:
HomeInfo
{
"trending": [/* Array of MinimalAnime */],
"latest_episodes": [/* Array of Anime */],
"top_upcoming_animes": [/* Array of Anime */],
"spotlight_animes": [/* Array of SpotlightAnime */],
"featured": {/* FeaturedAnime */},
"top_10_animes": {/* Top10PeriodRankedAnime */},
"genres": [/* Array of Strings */]
}
- Endpoint:
GET /hianime/anime/:anime_id
- Returns:
AboutAnime
{
"id": "string",
"mal_id": 123,
"al_id": 456,
"anime_id": 789,
"title": "string",
"description": "string",
"image": "string",
"rating": "string",
"category": "string",
"duration": "string",
"quality": "string",
"subs": 12,
"dubs": 34,
"eps": 24,
"japanese": "string",
"synonyms": "string",
"aired": "string",
"premiered": "string",
"status": "string",
"mal_score": "string",
"studios": ["string"],
"producers": ["string"],
"genres": ["string"],
"most_popular_animes": [/* Array of SideBarAnimes */],
"related_animes": [/* Array of SideBarAnimes */],
"recommended_animes": [/* Array of Anime */],
"seasons": [/* Array of AnimeSeason */]
}
- Endpoint:
GET /hianime/:category
- Returns:
CategoryInfo
{
"total_pages": 5,
"current_page": 1,
"has_next_page": true,
"animes": [/* Array of Anime */],
"top_10_animes": {/* Top10PeriodRankedAnime */},
"genres": [/* Array of Strings */]
}
- Endpoint:
GET /hianime/anime/:anime_id/episodes
- Returns:
EpisodesInfo
{
"total_episodes": 24,
"episodes": [/* Array of AnimeEpisode */]
}
- Endpoint:
GET /hianime/search/:query
- Returns:
SearchInfo
{
"total_pages": 3,
"current_page": 1,
"has_next_page": true,
"animes": [/* Array of Anime */],
"most_popular_animes": [/* Array of SideBarAnimes */],
"genres": [/* Array of Strings */]
}
- Endpoint:
GET /hianime/atoz-list
- Returns:
AtoZ
{
"has_next_page": true,
"current_page": 1,
"total_pages": 10,
"animes": [/* Array of Anime */]
}
- Endpoint:
GET /hianime/episode-src/:anime_id
- Returns:
ServerInfo
{
"episode_no": 1,
"sub": [/* Array of Server */],
"dub": [/* Array of Server */]
}
- Endpoint:
GET /hianime/episode-src-links/:anime_id
- Returns:
ServerExtractedInfo
{
"MegaCloud": {
"intro": {/* IntroOutro */},
"outro": {/* IntroOutro */},
"tracks": [/* Array of Track */],
"sources": [/* Array of Source */]
}
}
All API responses are returned as JSON. In the case of an error, a response will be structured as follows:
{
"error": "Error message here"
}
Contributions are welcome! If you'd like to contribute to KawaiiKinetics, please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Axum for the web framework.
- Shuttle for seamless deployment.
- Aniscraper for anime scraping functionality.