giphy

package
v0.0.0-...-553821e Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package giphy provides a crappy and inclomplete - but at least bloat free - Giphy API client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey string, version string) *Client

func (*Client) Search

func (c *Client) Search(keyword string, limit, offset int, rating string) (gifs []Gif, err error)

type Error

type Error struct {
	Message string `json:"message"`
	Code    int
}

func (Error) Error

func (e Error) Error() string

type Gif

type Gif struct {
	Type     string `json:"type"`
	Id       string `json:"id"`
	Slug     string `json:"slug"`
	Url      string `json:"url"`
	BitlyUrl string `json:"bitly_url"`
	EmbedUrl string `json:"embed_url"`
	Username string `json:"username"`
	Source   string `json:"source"`
	Rating   string `json:"rating"`
	Title    string `json:"string"`
	Images   Images `json:"images"`
}

type Image

type Image struct {
	Url    string `json:"url"`
	Width  string `json:"width"`
	Height string `json:"height"`
	Size   string `json:"size"`
}

type Images

type Images struct {
	Still480W              Image `json:"480w_still"`
	Downsized              Image `json:"downsized"`
	DownsizedLarge         Image `json:"downsized_large"`
	DownsizedMedium        Image `json:"downsized_medium"`
	DownsizedSmall         Image `json:"downsized_small"`
	DownsizedStill         Image `json:"downsized_still"`
	FixedHeight            Image `json:"fixed_height"`
	FixedHeightDownsampled Image `json:"fixed_height_downsampled"`
	FixedHeightSmall       Image `json:"fixed_height_small"`
	FixedHeightSmallStill  Image `json:"fixed_height_small_still"`
	FixedHeightStill       Image `json:"fixed_height_still"`
	FixedWidth             Image `json:"fixed_width"`
	FixedWidthDownsampled  Image `json:"fixed_width_downsampled"`
	FixedWidthSmall        Image `json:"fixed_width_small"`
	FixedWidthSmallStill   Image `json:"fixed_width_small_still"`
	FixedWidthStill        Image `json:"fixed_width_still"`
	Hd                     Image `json:"hd"`
	Looping                Image `json:"looping"`
	Original               Image `json:"original"`
	OriginalMp4            Image `json:"original_mp4"`
	OriginalStill          Image `json:"original_still"`
	Preview                Image `json:"preview"`
	PreviewGif             Image `json:"preview_gif"`
	PreviewWebp            Image `json:"preview_webp"`
}

Jump to

Keyboard shortcuts

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