A rust library / tool to parse match results from https://popflash.site
. Example output seen here https://pastebin.com/MKUyjx9b.
Add the library as a dependency in your cargo.toml
such as follows
``
Cargo.toml`
[dependencies] popflashparser = "0.1.0" serdejson = "~1.0"
src/main.rs
fn main() { let matchdata = popflashparser::synchronous::matchfromid("1281644"); let jsonstring = serdejson::tostring(&game).unwrap(); let jsonjson = serdejson::Value::from(jsonstring); } ```
An asynchronous interface is also available (and is the default) but requires an asynchronous context (such as tokio) and aims to keep the same interface
``
Cargo.toml`
[dependencies]
popflashparser = "0.1.0"
serdejson = "~1.0"
tokio = { version = "1", features = ["full"] }
src/main.rs
async fn main() { let matchdata = popflashparser::matchfromid("1281644").await; let jsonstring = serdejson::tostring(&game).unwrap(); let jsonjson = serdejson::Value::from(jsonstring); } ```
see the Issues
page