crookedmonkey

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 28 Imported by: 0

README

crooked-monkey

GoDoc

A set of clients that leverage http://git.sr.ht/~hokiegeek/ytpulse in order to help me better manage and catalog the hundreds of yoga videos on YouTube that I have gathered over the years.

CLI

this explains nothing screenshot of crooked monkey TUI

TUI

It's coming along screenshot of crooked monkey TUI

Documentation

Index

Constants

View Source
const (
	PulseWatchQueueName = "crooked monkey: next"
)

Variables

This section is empty.

Functions

func AddPlaylistVideos

func AddPlaylistVideos(rest *PulseHttp, tuber ytlibrarian.Tuber, refid string, tags []string) error

func AddUser

func AddUser(rest *PulseHttp, user string, authorize bool) error

func AddVideoToPulse

func AddVideoToPulse(rest *PulseHttp, refID string, tags []string, rating, effort, skill int) error

func AddVideosToWatchQueue added in v0.1.1

func AddVideosToWatchQueue(rest *PulseHttp, vidIds []string) error

func AuthorizeUser

func AuthorizeUser(rest *PulseHttp, user string) error

func CreateSession

func CreateSession(rest *PulseHttp, session *ytpulse.Session) (string, error)

func CreateSessionWithVideos

func CreateSessionWithVideos(rest *PulseHttp, session *ytpulse.Session, videoIds []string) (string, error)

func FilterSessionSlice added in v0.1.1

func FilterSessionSlice(filterStr string, sessions []ytpulse.Session) ([]ytpulse.Session, error)

func FilterVideoSlice

func FilterVideoSlice(filterStr string, videos []ytpulse.Video) ([]ytpulse.Video, error)

func GetCacheDir added in v0.1.1

func GetCacheDir() string

func GetCachedChannels added in v0.1.1

func GetCachedChannels(rest *PulseHttp) (channels []ytpulse.Channel, err error)

func GetCachedUserSessions

func GetCachedUserSessions(rest *PulseHttp) (sessions []ytpulse.Session, err error)

func GetCachedUserVideos

func GetCachedUserVideos(rest *PulseHttp) (videos []ytpulse.Video, err error)

func GetCachedUsers added in v0.1.1

func GetCachedUsers(rest *PulseHttp) (users []ytpulse.User, err error)

func GetCachedVideo added in v0.1.1

func GetCachedVideo(rest *PulseHttp, id string, isRefid bool) (ytpulse.Video, error)

func GetCachedWatchQueue added in v0.1.1

func GetCachedWatchQueue(rest *PulseHttp) (queue ytpulse.WatchQueue, err error)

func GetChannels

func GetChannels(rest *PulseHttp) ([]ytpulse.Channel, error)

func GetUserSessions

func GetUserSessions(rest *PulseHttp) ([]ytpulse.Session, error)

func GetUserVideos

func GetUserVideos(rest *PulseHttp) ([]ytpulse.Video, error)

func GetUsers

func GetUsers(rest *PulseHttp) ([]ytpulse.User, error)

func GetVideo

func GetVideo(rest *PulseHttp, id string, isRefid bool) (ytpulse.Video, error)

func GetVideosByIDs

func GetVideosByIDs(rest *PulseHttp, ids []string) ([]ytpulse.Video, error)

func GetWatchQueue added in v0.1.1

func GetWatchQueue(rest *PulseHttp) (ytpulse.WatchQueue, error)

func IsTokenExpired

func IsTokenExpired(token *oauth2.Token) bool

func NewOAuth2Config

func NewOAuth2Config(clientID, secret string) *oauth2.Config

func NewOAuthToken

func NewOAuthToken(ctx context.Context, config *oauth2.Config) *oauth2.Token

func ParseRange added in v0.1.1

func ParseRange(in string) []int

func PlaylistIdFromURL

func PlaylistIdFromURL(link string) (string, error)

func PrintVideoSlice

func PrintVideoSlice(format string, videos []ytpulse.Video) error

func PrintWatchQueue added in v0.1.1

func PrintWatchQueue(rest *PulseHttp, queue ytpulse.WatchQueue) error

func RemoveWatchQueue added in v0.1.1

func RemoveWatchQueue(rest *PulseHttp) error

func UpdateVideoData

func UpdateVideoData(rest *PulseHttp, vid ytpulse.Video) error

func UpdateVideoTags added in v0.1.1

func UpdateVideoTags(rest *PulseHttp, videos []ytpulse.Video, add, remove []string) []error

func UpdateWatchQueue added in v0.1.1

func UpdateWatchQueue(rest *PulseHttp, queue ytpulse.WatchQueue) error

func VideoIdFromURL

func VideoIdFromURL(link string) (string, error)

Types

type PulseHttp

type PulseHttp struct {
	OauthToken  *oauth2.Token
	OauthConfig *oauth2.Config
	Username    string
	// contains filtered or unexported fields
}

func NewPulseHttp

func NewPulseHttp(clientID, secret, pulseHost, pulseApiToken string) (*PulseHttp, error)

func (*PulseHttp) Del

func (h *PulseHttp) Del(endpoint string) (*http.Response, []byte, error)

func (*PulseHttp) Get

func (h *PulseHttp) Get(endpoint string) (*http.Response, []byte, error)

func (*PulseHttp) Post

func (h *PulseHttp) Post(endpoint, payload string) (*http.Response, []byte, error)

func (*PulseHttp) Put

func (h *PulseHttp) Put(endpoint, payload string) (*http.Response, []byte, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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