popflash_parser

A rust library / tool to parse match results from https://popflash.site. Example output seen here https://pastebin.com/MKUyjx9b.

Getting Started

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

[tokio::main]

async fn main() { let matchdata = popflashparser::matchfromid("1281644").await; let jsonstring = serdejson::tostring(&game).unwrap(); let jsonjson = serdejson::Value::from(jsonstring); } ```

todos

see the Issues page