Skip to content

An unofficial rust library allowing easy access to duolingo users' course data

License

Notifications You must be signed in to change notification settings

misten1/duolingo-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

duolingo-query

Crates.io Version

A teeny tiny rust library to query duolingo users' profile information through the unofficial Duolingo API

Example

// 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));

API Warning

⚠️ 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

About

An unofficial rust library allowing easy access to duolingo users' course data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages