Struct imgur::Handle [] [src]

pub struct Handle {
    // some fields omitted
}

A handle to the imgur API.

Methods

impl Handle

fn new(client_id: String) -> Self

Create a new handle.

Parameters

client_id: Client ID required to access the imgur API.

fn upload(&self, data: &[u8]) -> Result<UploadInfo, UploadError>

Upload image data to imgur.

Parameters

data: The image data to upload.

Returns

UploadInfo on success, UploadError on failure.