pub struct UploadClient<B = Body> {
pub access_token: String,
/* private fields */
}Expand description
Client used to make requests to the Wistia Upload API.
§Note
Prefer to use this with one of the concrete implementations, i.e.
crate::FileUploader or crate::UrlUploader.
Also check out the rust-wistia docs for usage and examples.
Fields§
§access_token: StringRepresents the API access token used to authenticate requests to the Wistia API.
Implementations§
Source§impl<B: HttpBody + Send + 'static> UploadClient<B>
impl<B: HttpBody + Send + 'static> UploadClient<B>
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Initialize a new UploadClient object from an API access token,
assuming this is currently set in the environment.
Sourcepub fn from_token(token: &str) -> Self
pub fn from_token(token: &str) -> Self
Initialize a new UploadClient object from an API access token.
Sourcepub fn build_url(params: UploadRequest<'_>) -> Result<String>
pub fn build_url(params: UploadRequest<'_>) -> Result<String>
Build the URL with the url-encoded query parameters included
Sourcepub async fn make_request<'a>(
&'a self,
url: &'a str,
req: Request<B>,
) -> Result<UploadResponse>
pub async fn make_request<'a>( &'a self, url: &'a str, req: Request<B>, ) -> Result<UploadResponse>
Send the request to the Wistia Upload API
Trait Implementations§
Source§impl<B: Clone> Clone for UploadClient<B>
impl<B: Clone> Clone for UploadClient<B>
Source§fn clone(&self) -> UploadClient<B>
fn clone(&self) -> UploadClient<B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<B> Freeze for UploadClient<B>
impl<B = Body> !RefUnwindSafe for UploadClient<B>
impl<B> Send for UploadClient<B>where
B: Send,
impl<B> Sync for UploadClient<B>where
B: Send,
impl<B> Unpin for UploadClient<B>
impl<B = Body> !UnwindSafe for UploadClient<B>
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