bigg

package
v0.0.0-...-e687133 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ISO8601_LAYOUT string = "2006-01-02T15:04:05Z0700"

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	*youtube.Channel
}

type Client

type Client struct {
	ClientID     string
	ClientSecret string
	TokenFile    string
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Authorize

func (a *Client) Authorize() error

Authorize performs the OAuth authorization to google api

func (*Client) EnableLogTransport

func (a *Client) EnableLogTransport()

func (*Client) NewYoutubeService

func (a *Client) NewYoutubeService() (*Youtube, error)

func (*Client) SetSecretFromFile

func (a *Client) SetSecretFromFile(file string) error

type Playlist

type Playlist struct {
	*youtube.Playlist
}

type PlaylistItem

type PlaylistItem struct {
	*youtube.PlaylistItem
}

type Sub

type Sub struct {
	*youtube.Subscription
}

type Youtube

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

func (*Youtube) GetChannelInfo

func (s *Youtube) GetChannelInfo(id string) (*Channel, error)

GetChannelInfo returns channel info from ID. Returned value will contain only the "contentDetails" resource property (https://developers.google.com/youtube/v3/docs/channels#contentDetails). The GCloud quota impact is 1 unit

func (*Youtube) GetCost

func (s *Youtube) GetCost() uint32

func (*Youtube) PlaylistDelete

func (s *Youtube) PlaylistDelete(playlistId string) error

PlaylistDelete deletes a playlist from the authenticated user. The GCloud quota impact is 50 units.

func (*Youtube) PlaylistInsert

func (s *Youtube) PlaylistInsert(title string) (*Playlist, error)

PlaylistInsert creates a new private playlist for the authenticated user. The GCloud quota impact is 50 units.

func (*Youtube) PlaylistItemsInsert

func (s *Youtube) PlaylistItemsInsert(playlistId, videoId string) (*PlaylistItem, error)

PlaylistItemsInsert adds a video to a playlist. The GCloud quota impact is 50 units.

func (*Youtube) PlaylistItemsList

func (s *Youtube) PlaylistItemsList(playlistId string, filter func(*PlaylistItem) (bool, error), out chan<- *PlaylistItem) error

PlaylistItemsList sends to out the items of a playlist until the filter function returns false. Playlist id can be a user own playlist or a public playlist. Items will contain only the "snippet" resource property (https://developers.google.com/youtube/v3/docs/playlistItems#snippet). The GCloud quota impact is 1 unit every 50 items fetched.

func (*Youtube) PlaylistsList

func (s *Youtube) PlaylistsList(out chan<- *Playlist) error

PlaylistsList returns all user playlists. Items will contain the "snippet" (https://developers.google.com/youtube/v3/docs/playlists#snippet) and the "contentDetails" (https://developers.google.com/youtube/v3/docs/playlists#contentDetails) resource properties The GCloud quota impact is 1 unit every 50 items fetched.

func (*Youtube) SubscriptionDelete

func (s *Youtube) SubscriptionDelete(channelId string) error

SubscriptionDelete delete a channel from subscriptions for the authenticated user's channel. This command will results in two api requests (subscriptionId from the channelId and the delete op). The GCloud quota impact is 51 units.

func (*Youtube) SubscriptionInsert

func (s *Youtube) SubscriptionInsert(channelId string) (*Sub, error)

SubscriptionInsert adds a subscription for the authenticated user's channel. The GCloud quota impact is 50 units.

func (*Youtube) SubscriptionsList

func (s *Youtube) SubscriptionsList(out chan<- *Sub) error

SubscriptionsList sends to out all the user subscriptions. Items will contain only the "snippet" resource property (https://developers.google.com/youtube/v3/docs/subscriptions#snippet). The GCloud quota impact is 1 unit every 50 items fetched.

Jump to

Keyboard shortcuts

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