PigRabbit

github docs cratesio

A rust wrapper for porkbun's api

Example

Adding a record to the domain and view all the records:

```rust let keysfile = std::fs::readtostring("keys.json").expect("File not found!"); let keys = serdejson::fromstr(&keysfile).unwrap(); let mut client = pigrabbit::PRClient::new(keys);

let record = pigrabbit::types::Record{ name: "internal".toowned(), dtype: "A".toowned(), content: "1.1.1.1".toowned(), ttl: "300".toowned() };

client.addrecord("Example.com",&record).await.unwrap(); //Wait for the remote to catch up tokio::time::sleep(std::time::Duration::fromsecs(1)).await; let records = client.retreivebydomainwithid("Example.com", "").await.unwrap(); println!("{:?}", records);

```