gandi-live-dns-rust/src/gandi/mod.rs
Kaan Barmore-Genç 90c5485cce
Add first test (#38)
* wip

* wip implement test

* complete test

* add lint and test actions

* fix bad format
2022-08-22 22:20:10 -04:00

16 lines
397 B
Rust

pub(crate) struct GandiAPI<'t> {
pub(crate) base_url: &'t str,
pub(crate) fqdn: &'t str,
pub(crate) rrset_name: &'t str,
pub(crate) rrset_type: &'t str,
}
impl<'t> GandiAPI<'t> {
pub(crate) fn url(&self) -> String {
format!(
"{}/v5/livedns/domains/{}/records/{}/{}",
self.base_url, self.fqdn, self.rrset_name, self.rrset_type
)
}
}