https://github.com/rroohhh/moonboard-rs
rust moonboard api
https://github.com/rroohhh/moonboard-rs
Last synced: about 1 month ago
JSON representation
rust moonboard api
- Host: GitHub
- URL: https://github.com/rroohhh/moonboard-rs
- Owner: rroohhh
- License: agpl-3.0
- Created: 2020-04-08T12:38:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T13:01:00.000Z (about 5 years ago)
- Last Synced: 2025-03-28T19:38:42.643Z (about 2 months ago)
- Language: Rust
- Size: 60.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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 downloadAbove the raw API layer a more ergonomic API that allows for fast queries and automatic syncing is planned.
## raw API layer basic usage
```rust
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()
);
```