pub struct TensorDock {
pub config: Config,
/* private fields */
}
Expand description
Client for the TensorDock Marketplace API, found here: https://documenter.getpostman.com/view/20973002/2s8YzMYRDc
This struct exposes methods for interacting directly with the TensorDock Marketplace API, requiring a configuration to be constructed containing a valid authorization key and token. Authorization keys and tokens can be generated from https://marketplace.tensordock.com/api.
Fields§
§config: Config
The configuration for the TensorDock client, containing the authorization key and token.
Implementations§
Source§impl TensorDock
impl TensorDock
Sourcepub fn new(config: Config) -> Self
pub fn new(config: Config) -> Self
Create a new TensorDock
client with the given configuration that
contains a valid authorization key and token.
Sourcepub async fn test(self) -> Result<bool, Box<dyn Error>>
pub async fn test(self) -> Result<bool, Box<dyn Error>>
Test the authorization key and token to determine that the authorization
is registered and valid. A POST request is made to the endpoint with the
authorization key and token. The endpoint then returns true
if the
authorizations are registered and valid. Endpoint:
https://marketplace.tensordock.com/api/v0/auth/test