An API client for connpass.com. The specification is here.
The asynchronous example uses tokio and reqwest crate, so the Cargo.toml settings could look like the below:
[dependencies]
tokio = { version = "1.12.0", features = ["full"] }
connpass-rs = "0.1.0"
The code is like (the complete example in here):
```rust use connpass_rs::{client::ConnpassClient, query::builder::QueryBuilder};
async fn main() { let query = QueryBuilder::begin().eventid(228732).build(); if let Ok(query) = query { let client = ConnpassClient::new(); let res = client.sendrequest(query).await; match res { Ok(r) => println!("{:?}", r), Err(err) => eprintln!("{:?}", err), } } } ```
There's an optional "blocking" client that can be enabled:
[dependencies]
connpass-rs = { version = "0.1.0", features = ["blocking"] }
And then, the code looks like (the complete example is here):
```rust use connpass_rs::{client::blocking::ConnpassClient, query::builder::QueryBuilder};
fn main() { let query = QueryBuilder::begin().eventid(228732).build(); if let Ok(query) = query { let client = ConnpassClient::new(); let res = client.sendrequest(query); match res { Ok(r) => println!("{:?}", r), Err(err) => eprintln!("{:?}", err), } } } ```
MIT