pub struct HotClient { /* private fields */ }Expand description
Hot API v1 client. Construct it with HotClient::builder; the resource
accessors mirror the Hot API resources.
Implementations§
Source§impl HotClient
impl HotClient
Sourcepub fn builder(token: impl Into<String>) -> HotClientBuilder
pub fn builder(token: impl Into<String>) -> HotClientBuilder
Returns a builder using the given Hot API key, session token, or service key.
pub fn builds(&self) -> BuildsResource
pub fn context(&self) -> ContextResource
pub fn domains(&self) -> DomainsResource
pub fn env(&self) -> EnvResource
pub fn events(&self) -> EventsResource
pub fn files(&self) -> FilesResource
pub fn org(&self) -> OrgResource
pub fn projects(&self) -> ProjectsResource
pub fn runs(&self) -> RunsResource
pub fn service_keys(&self) -> ServiceKeysResource
pub fn sessions(&self) -> SessionsResource
pub fn streams(&self) -> StreamsResource
Sourcepub async fn request(
&self,
method: Method,
path: &str,
body: Option<&Value>,
query: &[(&str, &str)],
) -> Result<JsonObject>
pub async fn request( &self, method: Method, path: &str, body: Option<&Value>, query: &[(&str, &str)], ) -> Result<JsonObject>
Calls a JSON API endpoint that does not yet have a resource helper.
path is relative to /v1 and the returned object is the response
envelope.
Sourcepub fn request_builder(&self, method: Method, path: &str) -> RequestBuilder
pub fn request_builder(&self, method: Method, path: &str) -> RequestBuilder
Returns an authorized RequestBuilder for a path relative to /v1,
for endpoints needing full control (raw bodies, custom headers).
Send it with HotClient::execute to get API error mapping.
Sourcepub async fn execute(&self, builder: RequestBuilder) -> Result<Response>
pub async fn execute(&self, builder: RequestBuilder) -> Result<Response>
Sends a request built with HotClient::request_builder, mapping
non-2xx responses to crate::ApiError.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HotClient
impl !UnwindSafe for HotClient
impl Freeze for HotClient
impl Send for HotClient
impl Sync for HotClient
impl Unpin for HotClient
impl UnsafeUnpin for HotClient
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