Documentation
¶
Index ¶
- type Client
- func (client *Client) DeleteImageAuthed(id string) (*ImageInfoWithoutData, int, error)
- func (client *Client) DeleteImageUnAuthed(hash string) (*ImageInfoWithoutData, int, error)
- func (client *Client) UploadImage(img string, dtype string, album string) (*ImageInfoData, int, error)
- func (client *Client) UploadImageFromFile(path string, album string) (*ImageInfoData, int, error)
- func (client *Client) UploadImageFromURL(imgUrl string, album string) (*ImageInfoData, int, error)
- type ImageInfo
- type ImageInfoData
- type ImageInfoWithoutData
- type Imgur
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DeleteImageAuthed ¶
func (client *Client) DeleteImageAuthed(id string) (*ImageInfoWithoutData, int, error)
func (*Client) DeleteImageUnAuthed ¶
func (client *Client) DeleteImageUnAuthed(hash string) (*ImageInfoWithoutData, int, error)
func (*Client) UploadImage ¶
func (client *Client) UploadImage(img string, dtype string, album string) (*ImageInfoData, int, error)
Upload Image to Imgur
func (*Client) UploadImageFromFile ¶
Upload Image to Imgur by File
func (*Client) UploadImageFromURL ¶
Upload Image to Imgur by URL
type ImageInfo ¶
type ImageInfo struct {
// Imgur img ID e.g. abcde123098
ID string `json:"id"`
// ID with extention e.g. abcde123098.png
IDExt string
// Image Title
Title string `json:"title"`
// Image Description
Description string `json:"description"`
// Image Upload Datetime
Datetime int `json:"datetime"`
// Type Format
MimeType string `json:"type"`
// Image is animated?
Animated bool `json:"animated"`
// Image width
Width int `json:"width"`
// Image height
Height int `json:"height"`
// Image File Size
Size int `json:"size"`
// Image Views
Views int `json:"views"`
// Imgur Bandwidth
Bandwidth int `json:"bandwidth"`
// Imgur Delete Hash
Deletehash string `json:"deletehash,omitempty"`
// The name of the file
Name string `json:"name,omitempty"`
Section string `json:"section"`
// Image URL e.g. https://i.imgur.com/abcde123098.png
Link string `json:"link"`
Gifv string `json:"gifv,omitempty"`
Mp4 string `json:"mp4,omitempty"`
Mp4Size int `json:"mp4_size,omitempty"`
Looping bool `json:"looping,omitempty"`
Favorite bool `json:"favorite"`
// Image is Nsfw?
Nsfw bool `json:"nsfw"`
Vote string `json:"vote"`
InGallery bool `json:"in_gallery"`
}
type ImageInfoData ¶
type ImageInfoWithoutData ¶
Click to show internal directories.
Click to hide internal directories.