duolingo-query

Crates.ioduolingo-query
lib.rsduolingo-query
version0.1.41
sourcesrc
created_at2024-08-04 15:47:14.462165
updated_at2024-08-04 21:59:20.56056
descriptionA teeny tiny unofficial library for getting user information on duolingo
homepage
repositoryhttps://github.com/misten1/duolingo-query
max_upload_size
id1325088
size13,749
misten (misten1)

documentation

README

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

Commit count: 0

cargo fmt