pub struct NaClient {
pub address: String,
pub api_key: String,
pub http_client: Client,
}Fields§
§address: String§api_key: String§http_client: ClientImplementations§
Source§impl NaClient
impl NaClient
Sourcepub async fn new(api_key: String, address: String) -> Self
pub async fn new(api_key: String, address: String) -> Self
build the client to use local resolver, IE Ipv4
Sourcepub async fn get_data(&self, path: &str) -> Result<Value, NaApiError>
pub async fn get_data(&self, path: &str) -> Result<Value, NaApiError>
Call the get and parse the results We want to get the “data” attribute from the response for the calling endpoint. Exit with error message if “data” is not present This is shitty but it is safe enough so far as I can tell at this point
Auto Trait Implementations§
impl Freeze for NaClient
impl !RefUnwindSafe for NaClient
impl Send for NaClient
impl Sync for NaClient
impl Unpin for NaClient
impl !UnwindSafe for NaClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more