Struct Gyazo
Source pub struct Gyazo {
pub access_token: String,
pub client: Client,
}
Expand description
A client for interacting with the Gyazo API.
Access token for authentication.
HTTP client for making requests.
Deletes an image from Gyazo.
§Arguments
image_id - The ID of the image to delete.
§Returns
A Result containing DeleteResponse on success or a reqwest::Error on failure.
Retrieves a list of images from Gyazo.
§Arguments
page - The page number to retrieve.
per_page - Number of images per page.
§Returns
A Result containing a vector of ImageInfo on success or a reqwest::Error on failure.
Retrieves information about a specific image.
§Arguments
image_id - The ID of the image to retrieve.
§Returns
A Result containing ImageInfo on success or a reqwest::Error on failure.
Uploads an image to Gyazo.
§Arguments
image_path - Path to the image file to upload.
options - Optional upload configuration.
§Returns
A Result containing UploadResponse on success or a reqwest::Error on failure.
Creates a new instance of the Gyazo client.
§Arguments
access_token - A String representing the access token.
§Example
let gyazo = Gyazo::new("your_access_token".to_string());
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.