gifs

package
v0.0.0-...-36ba837 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

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

func NewGIFSClient(apiKey string) Client

NewGIFSClient interacts with production gifs API endpoint

func NewGIFSClientWithURL

func NewGIFSClientWithURL(baseURL string, apiKey string) Client

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL