youtube

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_youtube_proto protoreflect.FileDescriptor

Functions

func NewYoutubeEndpoints

func NewYoutubeEndpoints() []*api.Endpoint

func RegisterYoutubeHandler

func RegisterYoutubeHandler(s server.Server, hdlr YoutubeHandler, opts ...server.HandlerOption) error

Types

type SearchRequest

type SearchRequest struct {

	// Query to search for
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

Search for videos on YouTube

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() 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 for the query
	Results []*SearchResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetResults

func (x *SearchResponse) GetResults() []*SearchResult

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

type SearchResult

type SearchResult struct {

	// id of the result
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// kind of result; "video", "channel", "playlist"
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// title of the result
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// the result description
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// the channel id
	ChannelId string `protobuf:"bytes,5,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// the channel title
	ChannelTitle string `protobuf:"bytes,6,opt,name=channel_title,json=channelTitle,proto3" json:"channel_title,omitempty"`
	// published at time
	PublishedAt string `protobuf:"bytes,7,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"`
	// if live broadcast then indicates activity.
	// none, upcoming, live, completed
	Broadcasting string `protobuf:"bytes,8,opt,name=broadcasting,proto3" json:"broadcasting,omitempty"`
	// the associated url
	Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResult) Descriptor deprecated

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

Deprecated: Use SearchResult.ProtoReflect.Descriptor instead.

func (*SearchResult) GetBroadcasting

func (x *SearchResult) GetBroadcasting() string

func (*SearchResult) GetChannelId

func (x *SearchResult) GetChannelId() string

func (*SearchResult) GetChannelTitle

func (x *SearchResult) GetChannelTitle() string

func (*SearchResult) GetDescription

func (x *SearchResult) GetDescription() string

func (*SearchResult) GetId

func (x *SearchResult) GetId() string

func (*SearchResult) GetKind

func (x *SearchResult) GetKind() string

func (*SearchResult) GetPublishedAt

func (x *SearchResult) GetPublishedAt() string

func (*SearchResult) GetTitle

func (x *SearchResult) GetTitle() string

func (*SearchResult) GetUrl

func (x *SearchResult) GetUrl() string

func (*SearchResult) ProtoMessage

func (*SearchResult) ProtoMessage()

func (*SearchResult) ProtoReflect

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

func (*SearchResult) Reset

func (x *SearchResult) Reset()

func (*SearchResult) String

func (x *SearchResult) String() string

type YoutubeHandler

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

type YoutubeService

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

func NewYoutubeService

func NewYoutubeService(name string, c client.Client) YoutubeService

Jump to

Keyboard shortcuts

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