youtube

package module
Version: v0.0.0-...-d725090 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChannelResponses []*youtube.ChannelListResponse

ChannelResponses - holds responses from channels

View Source
var Client = &client.Services.YouTube

Client - youtube client for auth and API methods

View Source
var PageSize int64 = 50

PageSize - the number of items that will be returned in a single API call

View Source
var PlaylistItemResponses []*youtube.PlaylistItemListResponse

PlaylistItemResponses - holds responses for items of a playlist

View Source
var PlaylistResponses []*youtube.PlaylistListResponse

PlaylistResponses - holds responses from playlists

View Source
var SearchResponses []*youtube.SearchListResponse

SearchResponses - holds response from a search call

View Source
var VideoResponses []*youtube.VideoListResponse

VideoResponses - holds responses from videos

Functions

func ChannelsListByUsername

func ChannelsListByUsername(username string)

ChannelsListByUsername - example function from docs

func FetchAllChannels

func FetchAllChannels()

FetchAllChannels - Fetches youtube data for all channel values on the sheet

func FetchAllPlaylistItems

func FetchAllPlaylistItems()

FetchAllPlaylistItems - Fetch all playlist items from playlist responses

func FetchAllPlaylists

func FetchAllPlaylists()

FetchAllPlaylists - Fetches youtube data for all playlist values on the sheet

func FetchAllVideos

func FetchAllVideos()

FetchAllVideos - Fetches youtube data for all the videos on the sheet

func FetchOrRead

func FetchOrRead(pageType string, forceRefresh bool)

FetchOrRead - Read or fetch and write all values for a specific page type

func FetchOrReadAll

func FetchOrReadAll(forceRefresh bool)

FetchOrReadAll - Fetches all content types from the Youtube API

func GetAllPlaylistItemResponsesFromPlaylistID

func GetAllPlaylistItemResponsesFromPlaylistID(id string) []*youtube.PlaylistItemListResponse

GetAllPlaylistItemResponsesFromPlaylistID - Appends all playlist item responses from an ID to the main list

func GetAllVideoItemsFromPlaylistID

func GetAllVideoItemsFromPlaylistID(id string) []*youtube.VideoListResponse

GetAllVideoItemsFromPlaylistID - Retruns a list of videos from playlist

func GetChannelIDFromURL

func GetChannelIDFromURL(url string) string

GetChannelIDFromURL - Takes a string, splits it on "/" and gets the last field

func GetChannelResponseFromID

func GetChannelResponseFromID(id string) *youtube.ChannelListResponse

GetChannelResponseFromID - Returns a channel response given an ID

func GetChannelResponseFromURL

func GetChannelResponseFromURL(url string) *youtube.ChannelListResponse

GetChannelResponseFromURL - Returns a channel response from a URL

func GetPlaylistIDFromURL

func GetPlaylistIDFromURL(url string) string

GetPlaylistIDFromURL - Takes a URL string and gets everything to the right of playlist param

func GetPlaylistItemsResponseFromIDAtIndex

func GetPlaylistItemsResponseFromIDAtIndex(id string, videoIndex int64) *youtube.PlaylistItemListResponse

GetPlaylistItemsResponseFromIDAtIndex - Takes an id and position of a video in a playlist and returns a response

func GetPlaylistItemsResponseFromURLAtIndex

func GetPlaylistItemsResponseFromURLAtIndex(url string, videoIndex int64) *youtube.PlaylistItemListResponse

GetPlaylistItemsResponseFromURLAtIndex - Takes a URL string and index, returns playlist items response

func GetPlaylistRepsonseFromURL

func GetPlaylistRepsonseFromURL(url string) *youtube.PlaylistListResponse

GetPlaylistRepsonseFromURL - Takes a URL string and returns an playlist response

func GetPlaylistResponseFromID

func GetPlaylistResponseFromID(id string) *youtube.PlaylistListResponse

GetPlaylistResponseFromID - Takes a playlist id and executes API call to playlists service

func GetRandomChannel

func GetRandomChannel() *youtube.ChannelListResponse

GetRandomChannel - Returns a random playlist channel response

func GetRandomPlaylist

func GetRandomPlaylist() *youtube.PlaylistListResponse

GetRandomPlaylist - Returns a random playlist response

func GetRandomPlaylistItem

func GetRandomPlaylistItem() *youtube.PlaylistItem

GetRandomPlaylistItem - Returns a random playlist video response

func GetRandomVideo

func GetRandomVideo() *youtube.VideoListResponse

GetRandomVideo - Returns a random video response

func GetVideoIDFromURL

func GetVideoIDFromURL(url string) string

GetVideoIDFromURL - Get the video id from a given url

func GetVideoResponseFromID

func GetVideoResponseFromID(id string) *youtube.VideoListResponse

GetVideoResponseFromID - Returns a video response from video ID

func GetVideoResponseFromURL

func GetVideoResponseFromURL(url string) *youtube.VideoListResponse

GetVideoResponseFromURL - Returns a video response from a video URL

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL