gfycat

package module
v0.0.0-...-c5bf085 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2016 License: MIT Imports: 12 Imported by: 0

README

Gfycat API Package

GoDoc

A go package for the gfycat.com API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GfyCheckURLResponse

type GfyCheckURLResponse struct {
	URLKnown  bool
	GfyName   string
	GfyURL    string
	WEBMUrl   string
	MP4Url    string
	GIFUrl    string
	FrameRate int
}

GfyCheckURLResponse is the response of CheckGIFByURL().

func CheckGIFByURL

func CheckGIFByURL(gifURL string) (GfyCheckURLResponse, error)

CheckGIFByURL checks if a provided GIF URL was already posted to gfycat.com.

type GfyItem

type GfyItem struct {
	GfyID              string
	GfyName            string
	GfyNumber          string
	UserName           string
	Width              int
	Height             int
	FrameRate          int
	NumFrames          int
	MP4Url             string
	WEBMUrl            string
	GIFUrl             string
	GIFSize            int
	Mp4Size            int
	WEBMSize           int
	CreateDate         string
	Views              int
	Title              string
	ExtraLemmas        []string
	MD5                string
	Tags               []string
	NSFW               string
	SAR                string
	URL                string
	Source             string
	Dynamo             string
	Subreddit          string
	RedditID           string
	RedditIDText       string
	UploadGifName      string
	Likes              int
	Dislikes           int
	Published          int
	Description        string
	ExtraLemmaText     string
	URLMD5             string
	Task               string
	GfySize            int
	CopyrightClaimaint string
}

GfyItem is the response of UploadGIFByURL() and UploadGIFByFile().

func UploadGIFByFile

func UploadGIFByFile(gifFilePath, ownRandomString string) (GfyItem, error)

UploadGIFByFile uploads a GIF by a file path and returns information about the generated item. You must provide a random string for the GfyName.

func UploadGIFByURL

func UploadGIFByURL(gifURL string, ownRandomString string) (GfyItem, error)

UploadGIFByURL uploads a GIF by URL and returns information about the generated item. You can provide an optional random string for the GfyName.

type GfyOEmbed

type GfyOEmbed struct {
	Version      string
	Type         string
	ProviderName string `json:"provider_name"`
	Width        int
	Height       int
	Title        string
	HTML         string
}

GfyOEmbed is the response of GetOEmbedDataByGfyURL().

func GetOEmbedDataByGfyURL

func GetOEmbedDataByGfyURL(gfyURL string, maxWidth, maxHeight int) (GfyOEmbed, error)

GetOEmbedDataByGfyURL returns oembed information about the provided gfycat.com URL.

type GfyResponse

type GfyResponse struct {
	GfyItem GfyItem
}

GfyResponse is the response of GetGfyInfoByGfyName().

func GetGfyInfoByGfyName

func GetGfyInfoByGfyName(gfyName string) (GfyResponse, error)

GetGfyInfoByGfyName returns information about the provided GfyName.

Jump to

Keyboard shortcuts

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