Skip to content

rroohhh/moonboard-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moonboard-rs

This is a rust wrapper around the internal MoonBoard API that is used by the app.

Dissatisfaction with the existing app spawned this reverse engineering effort, that will hopefully help building a better app and better tools for using the MoonBoard.

This is still very much WIP and only a subset of the API is implemented. Currently supported:

  • problem database download
  • problem update download
  • hold setup download
  • user search
  • repeats download
  • comments download

Above the raw API layer a more ergonomic API that allows for fast queries and automatic syncing is planned.

raw API layer basic usage

let api = MoonboardAPI::new(env::var("MB_USER")?, env::var("MB_PASS")?);
println!("holdsetups {:#?}", api.holdsetups().await?);

println!("all_problems: {:?}", api.all_problems().await?.len());

println!(
    "updates: {:?}",
    api.problem_updates(
        DateTime::parse_from_rfc3339("2020-04-01T00:00:00-00:00")?.naive_utc(),
        Some(DateTime::parse_from_rfc3339("2020-04-01T00:00:00-00:00")?.naive_utc()),
        Some(DateTime::parse_from_rfc3339("2020-04-01T00:00:00-00:00")?.naive_utc())
    )
    .await?
    .len()
);

println!("search username: {:?}", api.search_user("username").await?);

println!(
    "problem comments: {:?}",
    api.problem_comments(20153).await?.len()
);

println!(
    "problem repeats: {:?}",
    api.problem_repeats(20153).await?.len()
);

About

rust moonboard api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published