Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllGiphy ¶
GetAllGiphy havest all teh gifts
Types ¶
type Client ¶
type Client struct { // APIKey is the key used for requests to the Giphy API APIKey string // Limit is the limit used for requests to the Giphy API Limit int // Rating is the rating used for requests to the Giphy API Rating string // BaseURL is the base url for Giphy API. BaseURL *url.URL // BasePath is the base path for the gifs endpoints BasePath string // User agent used for HTTP requests to Giphy API. UserAgent string // contains filtered or unexported fields }
A Client communicates with the Giphy API.
func NewClient ¶
NewClient returns a new Giphy API client. If no *http.Client were provided then http.DefaultClient is used.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred.
func (*Client) NewRequest ¶
NewRequest creates an API request.
type Gif ¶
type Gif struct { Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` Slug string `json:"slug,omitempty"` URL string `json:"url,omitempty"` BitlyURL string `json:"bitly_url,omitempty"` EmbedURL string `json:"embed_url,omitempty"` Username string `json:"username,omitempty"` Source string `json:"source,omitempty"` Rating string `json:"rating,omitempty"` Caption string `json:"caption,omitempty"` ContentURL string `json:"content_url,omitempty"` Tags []string `json:"tags,omitempty"` FeaturedTags []string `json:"featured_tags,omitempty"` User User `json:"user,omitempty"` SourceTld string `json:"source_tld,omitempty"` SourcePostURL string `json:"source_post_url,omitempty"` UpdateDatetime string `json:"update_datetime,omitempty"` CreateDatetime string `json:"create_datetime,omitempty"` ImportDatetime string `json:"import_datetime,omitempty"` TrendingDatetime string `json:"trending_datetime,omitempty"` Images Images `json:"images,omitempty"` }
Gif giphy gif structure
type Images ¶
type Images struct { FixedHeight gipyImageDataExtended `json:"fixed_height,omitempty"` FixedHeightStill gipyImageData `json:"fixed_height_still,omitempty"` FixedHeightDownsampled gipyImageDataExtended `json:"fixed_height_downsampled,omitempty"` FixedWidth gipyImageDataExtended `json:"fixed_width,omitempty"` FixedWidthStill gipyImageData `json:"fixed_width_still,omitempty"` FixedWidthDownsampled gipyImageDataExtended `json:"fixed_width_downsampled,omitempty"` FixedHeightSmall gipyImageDataExtended `json:"fixed_height_small,omitempty"` FixedHeightSmallStill gipyImageData `json:"fixed_height_small_still,omitempty"` FixedWidthSmall gipyImageDataExtended `json:"fixed_width_small,omitempty"` FixedWidthSmallStill gipyImageData `json:"fixed_width_small_still,omitempty"` Downsized gipyImageDataSized `json:"downsized,omitempty"` DownsizedStill gipyImageData `json:"downsized_still,omitempty"` DownsizedLarge gipyImageDataSized `json:"downsized_large,omitempty"` DownsizedMedium gipyImageDataSized `json:"downsized_medium,omitempty"` DownsizedSmall gipyImageDataSized `json:"downsized_small,omitempty"` Original gipyImageDataExtendedFrames `json:"original,omitempty"` OriginalStill gipyImageData `json:"original_still,omitempty"` Looping gipyImageLooping `json:"looping,omitempty"` Preview gipyImagePreview `json:"preview,omitempty"` PreviewGif gipyImageDataSized `json:"preview_gif,omitempty"` }
Images giphy image structure
type Meta ¶
type Meta struct { Status int `json:"status,omitempty"` Msg string `json:"msg,omitempty"` ResponseID string `json:"response_id,omitempty"` }
Meta The Meta Object
type Pagination ¶
type Pagination struct { TotalCount int `json:"total_count,omitempty"` Count int `json:"count,omitempty"` Offset int `json:"offset,omitempty"` }
Pagination The Pagination Object
type Search ¶
type Search struct { Data []Gif `json:"data"` Meta Meta `json:"meta"` Pagination Pagination `json:"pagination"` }
Search represents a search response from the Giphy API
Click to show internal directories.
Click to hide internal directories.