Documentation ¶
Index ¶
Constants ¶
View Source
const ApiEndpoint string = "https://api.gifs.com"
Variables ¶
View Source
var Authentication string
Functions ¶
func DownloadFile ¶
Types ¶
type Attribution ¶
type Bulk ¶
type Bulk struct {
New []New
}
func (*Bulk) Upload ¶
func (i *Bulk) Upload() ([]ImportResponse, error)
type ImportResponse ¶
type ImportResponse struct { Page string `json:"page"` Files struct { Gif string `json:"gif"` Jpg string `json:"jpg"` Mp4 string `json:"mp4"` Webm string `json:"webm"` } `json:"files"` Oembed string `json:"oembed"` Embed string `json:"embed"` Meta struct { Duration string `json:"duration"` Height string `json:"height"` Width string `json:"width"` } `json:"meta"` }
func (*ImportResponse) SaveGif ¶
func (r *ImportResponse) SaveGif() string
type New ¶
type New struct { Source string `json:"source,omitempty"` File string `json:"-"` Title string `json:"title,omitempty"` Tags []string `json:"tags,omitempty"` Attribution *Attribution `json:"attribution,omitempty"` Trim *Trim `json:"trim,omitempty"` Safe bool `json:"nsfw,omitempty"` }
func (*New) Create ¶
func (i *New) Create() (*ImportResponse, error)
func (*New) Upload ¶
func (i *New) Upload() (*ImportResponse, error)
type Success ¶
type Success struct {
Response ImportResponse `json:"success"`
}
Click to show internal directories.
Click to hide internal directories.