| Crates.io | duolingo-query |
| lib.rs | duolingo-query |
| version | 0.1.41 |
| created_at | 2024-08-04 15:47:14.462165+00 |
| updated_at | 2024-08-04 21:59:20.56056+00 |
| description | A teeny tiny unofficial library for getting user information on duolingo |
| homepage | |
| repository | https://github.com/misten1/duolingo-query |
| max_upload_size | |
| id | 1325088 |
| size | 13,749 |
A teeny tiny rust library to query duolingo users' profile information through the unofficial Duolingo API
// Query information about a duolingo user
let duo = Duolingo::query("christi3").await?;
// Print information about user's streaks
println!("{}", "-".repeat(10));
println!("Streak: {}", duo.get_streak());
println!("Uid: {}", duo.get_id());
// Dates are unix timestamps
println!("Creation date: {}", duo.get_creation_date());
// Print information about the user's courses
duo.get_courses().iter().for_each(|course| {
println!("{}", "-".repeat(10));
println!("Course: {}", course.get_title());
println!("Course XP: {}", course.get_xp());
println!("Course Lang: {}", course.get_learning_language());
});
println!("{}", "-".repeat(10));
println!("Total XP: {}", duo.get_total_xp());
println!("Username: {}", duo.get_username());
println!("Learning language: {}", duo.get_learning_language());
println!("Has Duolingo Plus: {}", duo.has_plus());
println!("{}", "-".repeat(10));
⚠️ This library is sensitive to api changes and as such might break if duolingo updates their api
Please don't hesitate to create an issue if the duolingo api changes