Expand description
§Webtoon
Welcome to the webtoon library, a Rust-based SDK that allows you to interact with a Webtoon platform programmatically.
This library provides a set of utilities and methods to handle various Webtoon-specific operations such as fetching episodes, posting comments, subscribing, liking, and managing episode metadata. Platform support varies.
Supported:
- webtoons.com (language support varies)
- comic.naver.com
- More to come!
§Capabilities
- Fetch information about webtoons and their episodes and their posts.
- Subscribe/unsubscribe to webtoons(
webtoons.comonly). - Like/unlike episodes (
webtoons.comonly). - Post and manage comments(
webtoons.comonly). - Retrieve detailed episode information such as views, published status, season number, etc.
§Installation
MSRV: 1.85.0
To use this library, add webtoon to your Cargo.toml:
[dependencies]
tokio = { version = "1", features = ["full"] }
webtoon = "0.9.0"§Quick-Start
The main entry point to the library is through a Client. Each platform has its own client that is responsible for
exposing various ways to interact with the specific platform.
§webtoons.com
use webtoon::platform::webtoons::{errors::Error, Client, Type};
#[tokio::main]
async fn main() -> Result<(), Error> {
// Initialize the client
let client = Client::new();
// Fetch a webtoon by its `id` and its `Type`
let webtoon = client
.webtoon(95, Type::Original)
.await?
.expect("No webtoon with this id and type on webtoon.com");
// Fetch title and print to stdout
println!("{}", webtoon.title().await?);
Ok(())
}
§comic.naver.com
use webtoon::platform::naver::{errors::Error, Client};
#[tokio::main]
async fn main() -> Result<(), Error> {
// Initialize the client
let client = Client::new();
// Fetch a webtoon by `id`
let webtoon = client
.webtoon(838432)
.await?
.expect("No webtoon with this id on comic.naver.com");
// Print title to stdout
println!("{}", webtoon.title());
Ok(())
}For more examples, check out the examples folder.
§Features
rss: Enables the ability to get the RSS feed data for awebtoons.com.
Modules§
- platform
- Module representing the platforms that this crate supports.