Expand description
§Simple and type-safe client for the Porkbun API.
Implements an easy-to-use client for interfacing with the Porkbun API. Ensures that correct values are supplied using the Rust type system.
§Examples
See hamsando-ddns for an implementation of a dynamic DNS program using this crate.
use hamsando::{domain::Domain, blocking::Client};
let client = Client::builder()
.apikey("<APIKEY>".to_string())
.secretapikey("<SECRETAPIKEY>".to_string())
.build()
.unwrap();
let my_ip = client.test_auth().unwrap();
let domain: Box<Domain> = "example.com".parse().unwrap();
let record_id = client.create_dns(&domain, &my_ip.into(), None, None).unwrap();Modules§
Structs§
- ApiError
- Apikey
- Client
- API client.
- Client
Builder - Builder for a Client that handles default values.
- NoApikey
- NoSecretapikey
- Secretapikey