1 unstable release
Uses new Rust 2024
new 0.1.0 | Apr 23, 2025 |
---|
#270 in HTTP client
24KB
520 lines
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 addr::parse_domain_name;
use hamsando::Client;
let client = Client::builder()
.apikey("<APIKEY>")
.secretapikey("<SECRETAPIKEY>")
.build()
.unwrap();
let my_ip = client.test_auth().unwrap();
let domain = parse_domain_name("example.com").unwrap();
let record_id = client.create_dns(&domain, &my_ip.into(), None, None).unwrap();
hamsando
A 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 addr::parse_domain_name;
use hamsando::Client;
let client = Client::builder()
.apikey("<APIKEY>")
.secretapikey("<SECRETAPIKEY>")
.build()
.unwrap();
let my_ip = client.test_auth().unwrap();
let domain = parse_domain_name("example.com").unwrap();
let record_id = client.create_dns(&domain, &my_ip.into(), None, None).unwrap();
Dependencies
~7–18MB
~295K SLoC