pub struct PRClient {
    pub key: Keys,
    /* private fields */
}Fields§
§key: KeysImplementations§
Source§impl PRClient
The domain_name argument for each function is the one that you own on PorkBun.com
 
impl PRClient
The domain_name argument for each function is the one that you own on PorkBun.com
pub fn new(keys: Keys) -> Self
Sourcepub async fn ping_test(&mut self) -> Result<(), PigRabbitError>
 
pub async fn ping_test(&mut self) -> Result<(), PigRabbitError>
The ping_test pings the server to check if the server is online as well as testing credentials.
Sourcepub async fn add_record(
    &mut self,
    domain: &str,
    record_struct: &Record,
) -> Result<i64, PigRabbitError>
 
pub async fn add_record( &mut self, domain: &str, record_struct: &Record, ) -> Result<i64, PigRabbitError>
The add_record function adds a DNS Record and return an id as an i64.
Sourcepub async fn edit_by_domain_and_id(
    &mut self,
    domain: &str,
    id: &str,
    record_struct: &Record,
) -> Result<(), PigRabbitError>
 
pub async fn edit_by_domain_and_id( &mut self, domain: &str, id: &str, record_struct: &Record, ) -> Result<(), PigRabbitError>
This function edits the record based on the domain. While the id requires you to get the id from the api.
You can use the retrieve_by_domain_with_id function with an  empty id
to list all of your records.
Sourcepub async fn edit_by_domain_subdomain_and_type(
    &mut self,
    domain: &str,
    subdomain: &str,
    record_struct: &Record,
) -> Result<(), PigRabbitError>
 
pub async fn edit_by_domain_subdomain_and_type( &mut self, domain: &str, subdomain: &str, record_struct: &Record, ) -> Result<(), PigRabbitError>
This function edits the record based on the domain, type and(or) subdomain.
Sourcepub async fn del_by_type_with_subdomain(
    &mut self,
    dtype: &str,
    domain: &str,
    subdomain: &str,
) -> Result<(), PigRabbitError>
 
pub async fn del_by_type_with_subdomain( &mut self, dtype: &str, domain: &str, subdomain: &str, ) -> Result<(), PigRabbitError>
This function deletes the record with the domain name, type and subdomain specified.
Sourcepub async fn del_by_id(
    &mut self,
    domain: &str,
    id: &str,
) -> Result<(), PigRabbitError>
 
pub async fn del_by_id( &mut self, domain: &str, id: &str, ) -> Result<(), PigRabbitError>
This function deletes the record with the domain name and id specified.
Sourcepub async fn retreive_by_type_with_subdomain(
    &mut self,
    dtype: &str,
    domain: &str,
    subdomain: &str,
) -> Result<Vec<RecordInfo>, PigRabbitError>
 
pub async fn retreive_by_type_with_subdomain( &mut self, dtype: &str, domain: &str, subdomain: &str, ) -> Result<Vec<RecordInfo>, PigRabbitError>
This function retrieve the record information with the domain name, type and subdomain specified.
Sourcepub async fn retreive_by_domain_with_id(
    &mut self,
    domain: &str,
    id: &str,
) -> Result<Vec<RecordInfo>, PigRabbitError>
 
pub async fn retreive_by_domain_with_id( &mut self, domain: &str, id: &str, ) -> Result<Vec<RecordInfo>, PigRabbitError>
This function,
with a specified id: retrieves the information on the specific record that you wanted to view.
without a specified id: lists all the records under that domain name.
Sourcepub async fn retreive_ssl_by_domain(
    &mut self,
    domain: &str,
) -> Result<Certificate, PigRabbitError>
 
pub async fn retreive_ssl_by_domain( &mut self, domain: &str, ) -> Result<Certificate, PigRabbitError>
This function retrieves all the ssl certificates attatched to the domain specified.