Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributionDetails ¶
type AttributionDetails struct {
Site string `json:"site"`
User string `json:"user"`
URL string `json:"url"`
}
AttributionDetails describes source content attribution info
type Client ¶
type Client interface {
Import(*ImportRequest) error
Upload(*UploadRequest, io.Reader) error
}
Client has functions for adding content to gifs
func NewGIFSClient ¶
NewGIFSClient interacts with production gifs API endpoint
func NewGIFSClientWithURL ¶
NewGIFSClientWithURL interacts with an arbitrary API endpoint
type ImportRequest ¶
type ImportRequest struct {
SourceURL string `json:"source"`
Title string `json:"title,omitempty"`
Tags []string `json:"tags,omitempty"`
NSFW bool `json:"nsfw"`
Attribution *AttributionDetails `json:"attribution"`
}
ImportRequest represents a request to import externally hosted content
type UploadRequest ¶
type UploadRequest struct {
Filename string
Title string
Tags []string
NSFW bool
Attribution *AttributionDetails
}
UploadRequest represents a request to add content that will be uploaded to gifs
Click to show internal directories.
Click to hide internal directories.