Crates.io | porkbun-rs |
lib.rs | porkbun-rs |
version | 0.1.0 |
source | src |
created_at | 2021-06-04 13:36:51.312458 |
updated_at | 2021-06-04 13:36:51.312458 |
description | Porkbun API client |
homepage | |
repository | https://github.com/muchobien/porkbun-rs |
max_upload_size | |
id | 406134 |
size | 81,113 |
An Porkbun API client written in 🦀.
Porkbun is a 🦀 client library for accessing the Porkbun API.
use porkbun_rs::{api, api::Query, auth::Auth, endpoints, Porkbun};
fn main() -> eyre::Result<()> {
let auth = Auth::new("apikey".into(), "apisecret".into());
let client = Porkbun::new(auth)?;
let endpoint = endpoints::Ping::builder().build()?;
api::ignore(endpoint).query(&client)?;
Ok(())
}
use porkbun_rs::{api, api::AsyncQuery, auth::Auth, endpoints, AsyncPorkbun};
#[tokio::main]
async fn main() -> eyre::Result<()> {
let auth = Auth::new("apikey".into(), "apisecret".into());
let client = AsyncPorkbun::new(auth)?;
let endpoint = endpoints::Ping::builder().build()?;
api::ignore(endpoint).query_async(&client).await?;
Ok(())
}