gifs

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_gifs_proto protoreflect.FileDescriptor

Functions

func NewGifsEndpoints

func NewGifsEndpoints() []*api.Endpoint

func RegisterGifsHandler

func RegisterGifsHandler(s server.Server, hdlr GifsHandler, opts ...server.HandlerOption) error

Types

type Gif

type Gif struct {

	// The ID of the GIF
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The slug used in the GIF's URL
	Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
	// The URL for this GIF
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// A short URL for this GIF
	ShortUrl string `protobuf:"bytes,4,opt,name=short_url,json=shortUrl,proto3" json:"short_url,omitempty"`
	// URL used for embedding the GIF
	EmbedUrl string `protobuf:"bytes,5,opt,name=embed_url,json=embedUrl,proto3" json:"embed_url,omitempty"`
	// The page on which this GIF was found
	Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
	// The content rating for the GIF
	Rating string `protobuf:"bytes,7,opt,name=rating,proto3" json:"rating,omitempty"`
	// The title for this GIF
	Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"`
	// The different formats available for this GIF
	Images *ImageFormats `protobuf:"bytes,9,opt,name=images,proto3" json:"images,omitempty"`
	// contains filtered or unexported fields
}

func (*Gif) Descriptor deprecated

func (*Gif) Descriptor() ([]byte, []int)

Deprecated: Use Gif.ProtoReflect.Descriptor instead.

func (*Gif) GetEmbedUrl

func (x *Gif) GetEmbedUrl() string

func (*Gif) GetId

func (x *Gif) GetId() string

func (*Gif) GetImages

func (x *Gif) GetImages() *ImageFormats

func (*Gif) GetRating

func (x *Gif) GetRating() string

func (*Gif) GetShortUrl

func (x *Gif) GetShortUrl() string

func (*Gif) GetSlug

func (x *Gif) GetSlug() string

func (*Gif) GetSource

func (x *Gif) GetSource() string

func (*Gif) GetTitle

func (x *Gif) GetTitle() string

func (*Gif) GetUrl

func (x *Gif) GetUrl() string

func (*Gif) ProtoMessage

func (*Gif) ProtoMessage()

func (*Gif) ProtoReflect

func (x *Gif) ProtoReflect() protoreflect.Message

func (*Gif) Reset

func (x *Gif) Reset()

func (*Gif) String

func (x *Gif) String() string

type GifsHandler

type GifsHandler interface {
	Search(context.Context, *SearchRequest, *SearchResponse) error
}

type GifsService

type GifsService interface {
	Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}

func NewGifsService

func NewGifsService(name string, c client.Client) GifsService

type ImageFormat

type ImageFormat struct {

	// height
	Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// width
	Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
	// size in bytes
	Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// URL of the gif
	Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	// URL to an MP4 version of the gif
	Mp4Url string `protobuf:"bytes,5,opt,name=mp4_url,json=mp4Url,proto3" json:"mp4_url,omitempty"`
	// size of the MP4 version
	Mp4Size int32 `protobuf:"varint,6,opt,name=mp4_size,json=mp4Size,proto3" json:"mp4_size,omitempty"`
	// URL to a webp version of the gif
	WebpUrl string `protobuf:"bytes,7,opt,name=webp_url,json=webpUrl,proto3" json:"webp_url,omitempty"`
	// size of the webp version
	WebpSize int32 `protobuf:"varint,8,opt,name=webp_size,json=webpSize,proto3" json:"webp_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ImageFormat) Descriptor deprecated

func (*ImageFormat) Descriptor() ([]byte, []int)

Deprecated: Use ImageFormat.ProtoReflect.Descriptor instead.

func (*ImageFormat) GetHeight

func (x *ImageFormat) GetHeight() int32

func (*ImageFormat) GetMp4Size

func (x *ImageFormat) GetMp4Size() int32

func (*ImageFormat) GetMp4Url

func (x *ImageFormat) GetMp4Url() string

func (*ImageFormat) GetSize

func (x *ImageFormat) GetSize() int32

func (*ImageFormat) GetUrl

func (x *ImageFormat) GetUrl() string

func (*ImageFormat) GetWebpSize

func (x *ImageFormat) GetWebpSize() int32

func (*ImageFormat) GetWebpUrl

func (x *ImageFormat) GetWebpUrl() string

func (*ImageFormat) GetWidth

func (x *ImageFormat) GetWidth() int32

func (*ImageFormat) ProtoMessage

func (*ImageFormat) ProtoMessage()

func (*ImageFormat) ProtoReflect

func (x *ImageFormat) ProtoReflect() protoreflect.Message

func (*ImageFormat) Reset

func (x *ImageFormat) Reset()

func (*ImageFormat) String

func (x *ImageFormat) String() string

type ImageFormats

type ImageFormats struct {

	// The original GIF. Good for desktop use
	Original *ImageFormat `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"`
	// A downsized version of the GIF < 2MB
	Downsized *ImageFormat `protobuf:"bytes,2,opt,name=downsized,proto3" json:"downsized,omitempty"`
	// Version of the GIF with fixed height of 200 pixels. Good for mobile use
	FixedHeight *ImageFormat `protobuf:"bytes,3,opt,name=fixed_height,json=fixedHeight,proto3" json:"fixed_height,omitempty"`
	// Static image of the GIF with fixed height of 200 pixels
	FixedHeightStill *ImageFormat `protobuf:"bytes,4,opt,name=fixed_height_still,json=fixedHeightStill,proto3" json:"fixed_height_still,omitempty"`
	// Version of the GIF with fixed height of 200 pixels and number of frames reduced to 6
	FixedHeightDownsampled *ImageFormat `` /* 129-byte string literal not displayed */
	// Version of the GIF with fixed width of 200 pixels. Good for mobile use
	FixedWidth *ImageFormat `protobuf:"bytes,6,opt,name=fixed_width,json=fixedWidth,proto3" json:"fixed_width,omitempty"`
	// Static image of the GIF with fixed width of 200 pixels
	FixedWidthStill *ImageFormat `protobuf:"bytes,7,opt,name=fixed_width_still,json=fixedWidthStill,proto3" json:"fixed_width_still,omitempty"`
	// Version of the GIF with fixed width of 200 pixels and number of frames reduced to 6
	FixedWidthDownsampled *ImageFormat `` /* 126-byte string literal not displayed */
	// Version of the GIF with fixed height of 100 pixels. Good for mobile keyboards
	FixedHeightSmall *ImageFormat `protobuf:"bytes,9,opt,name=fixed_height_small,json=fixedHeightSmall,proto3" json:"fixed_height_small,omitempty"`
	// Static image of the GIF with fixed height of 100 pixels
	FixedHeightSmallStill *ImageFormat `` /* 129-byte string literal not displayed */
	// Version of the GIF with fixed width of 100 pixels. Good for mobile keyboards
	FixedWidthSmall *ImageFormat `protobuf:"bytes,11,opt,name=fixed_width_small,json=fixedWidthSmall,proto3" json:"fixed_width_small,omitempty"`
	// Static image of the GIF with fixed width of 100 pixels
	FixedWidthSmallStill *ImageFormat `` /* 126-byte string literal not displayed */
	// Static image of the downsized version of the GIF
	DownsizedStill *ImageFormat `protobuf:"bytes,13,opt,name=downsized_still,json=downsizedStill,proto3" json:"downsized_still,omitempty"`
	// A downsized version of the GIF < 8MB
	DownsizedLarge *ImageFormat `protobuf:"bytes,14,opt,name=downsized_large,json=downsizedLarge,proto3" json:"downsized_large,omitempty"`
	// A downsized version of the GIF < 5MB
	DownsizedMedium *ImageFormat `protobuf:"bytes,15,opt,name=downsized_medium,json=downsizedMedium,proto3" json:"downsized_medium,omitempty"`
	// A downsized version of the GIF < 200kb
	DownsizedSmall *ImageFormat `protobuf:"bytes,16,opt,name=downsized_small,json=downsizedSmall,proto3" json:"downsized_small,omitempty"`
	// Static image of the original version of the GIF
	OriginalStill *ImageFormat `protobuf:"bytes,17,opt,name=original_still,json=originalStill,proto3" json:"original_still,omitempty"`
	// 15 second version of the GIF looping
	Looping *ImageFormat `protobuf:"bytes,18,opt,name=looping,proto3" json:"looping,omitempty"`
	// mp4 version of the GIF <50kb displaying first 1-2 secs
	Preview *ImageFormat `protobuf:"bytes,19,opt,name=preview,proto3" json:"preview,omitempty"`
	// Version of the GIF <50kb displaying first 1-2 secs
	PreviewGif *ImageFormat `protobuf:"bytes,20,opt,name=preview_gif,json=previewGif,proto3" json:"preview_gif,omitempty"`
	// contains filtered or unexported fields
}

A map of different formats (or renditions) of a GIF. See https://developers.giphy.com/docs/optional-settings#rendition-guide

func (*ImageFormats) Descriptor deprecated

func (*ImageFormats) Descriptor() ([]byte, []int)

Deprecated: Use ImageFormats.ProtoReflect.Descriptor instead.

func (*ImageFormats) GetDownsized

func (x *ImageFormats) GetDownsized() *ImageFormat

func (*ImageFormats) GetDownsizedLarge

func (x *ImageFormats) GetDownsizedLarge() *ImageFormat

func (*ImageFormats) GetDownsizedMedium

func (x *ImageFormats) GetDownsizedMedium() *ImageFormat

func (*ImageFormats) GetDownsizedSmall

func (x *ImageFormats) GetDownsizedSmall() *ImageFormat

func (*ImageFormats) GetDownsizedStill

func (x *ImageFormats) GetDownsizedStill() *ImageFormat

func (*ImageFormats) GetFixedHeight

func (x *ImageFormats) GetFixedHeight() *ImageFormat

func (*ImageFormats) GetFixedHeightDownsampled

func (x *ImageFormats) GetFixedHeightDownsampled() *ImageFormat

func (*ImageFormats) GetFixedHeightSmall

func (x *ImageFormats) GetFixedHeightSmall() *ImageFormat

func (*ImageFormats) GetFixedHeightSmallStill

func (x *ImageFormats) GetFixedHeightSmallStill() *ImageFormat

func (*ImageFormats) GetFixedHeightStill

func (x *ImageFormats) GetFixedHeightStill() *ImageFormat

func (*ImageFormats) GetFixedWidth

func (x *ImageFormats) GetFixedWidth() *ImageFormat

func (*ImageFormats) GetFixedWidthDownsampled

func (x *ImageFormats) GetFixedWidthDownsampled() *ImageFormat

func (*ImageFormats) GetFixedWidthSmall

func (x *ImageFormats) GetFixedWidthSmall() *ImageFormat

func (*ImageFormats) GetFixedWidthSmallStill

func (x *ImageFormats) GetFixedWidthSmallStill() *ImageFormat

func (*ImageFormats) GetFixedWidthStill

func (x *ImageFormats) GetFixedWidthStill() *ImageFormat

func (*ImageFormats) GetLooping

func (x *ImageFormats) GetLooping() *ImageFormat

func (*ImageFormats) GetOriginal

func (x *ImageFormats) GetOriginal() *ImageFormat

func (*ImageFormats) GetOriginalStill

func (x *ImageFormats) GetOriginalStill() *ImageFormat

func (*ImageFormats) GetPreview

func (x *ImageFormats) GetPreview() *ImageFormat

func (*ImageFormats) GetPreviewGif

func (x *ImageFormats) GetPreviewGif() *ImageFormat

func (*ImageFormats) ProtoMessage

func (*ImageFormats) ProtoMessage()

func (*ImageFormats) ProtoReflect

func (x *ImageFormats) ProtoReflect() protoreflect.Message

func (*ImageFormats) Reset

func (x *ImageFormats) Reset()

func (*ImageFormats) String

func (x *ImageFormats) String() string

type Pagination

type Pagination struct {

	// position in pagination
	Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// total number of results available
	TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	// total number returned in this response
	Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*Pagination) Descriptor deprecated

func (*Pagination) Descriptor() ([]byte, []int)

Deprecated: Use Pagination.ProtoReflect.Descriptor instead.

func (*Pagination) GetCount

func (x *Pagination) GetCount() int32

func (*Pagination) GetOffset

func (x *Pagination) GetOffset() int32

func (*Pagination) GetTotalCount

func (x *Pagination) GetTotalCount() int32

func (*Pagination) ProtoMessage

func (*Pagination) ProtoMessage()

func (*Pagination) ProtoReflect

func (x *Pagination) ProtoReflect() protoreflect.Message

func (*Pagination) Reset

func (x *Pagination) Reset()

func (*Pagination) String

func (x *Pagination) String() string

type SearchRequest

type SearchRequest struct {

	// The search term
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Max number of gifs to return. Defaults to 25
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// The start position of results (used with pagination)
	Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// Apply age related content filter. "g", "pg", "pg-13", or "r". Defaults to "g"
	Rating string `protobuf:"bytes,4,opt,name=rating,proto3" json:"rating,omitempty"`
	// ISO 2 letter language code for regional content
	Lang string `protobuf:"bytes,5,opt,name=lang,proto3" json:"lang,omitempty"`
	// contains filtered or unexported fields
}

Search for a GIF

func (*SearchRequest) Descriptor deprecated

func (*SearchRequest) Descriptor() ([]byte, []int)

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetLang

func (x *SearchRequest) GetLang() string

func (*SearchRequest) GetLimit

func (x *SearchRequest) GetLimit() int32

func (*SearchRequest) GetOffset

func (x *SearchRequest) GetOffset() int32

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() string

func (*SearchRequest) GetRating

func (x *SearchRequest) GetRating() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

func (x *SearchRequest) ProtoReflect() protoreflect.Message

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {

	// list of results
	Data []*Gif `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// information on pagination
	Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

func (*SearchResponse) Descriptor() ([]byte, []int)

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetData

func (x *SearchResponse) GetData() []*Gif

func (*SearchResponse) GetPagination

func (x *SearchResponse) GetPagination() *Pagination

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

func (x *SearchResponse) ProtoReflect() protoreflect.Message

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

Jump to

Keyboard shortcuts

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