plexcron

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TrigPlexSessions common.TriggerName = "Gathering and sending Plex Sessions."

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

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

Action contains the exported methods for this package.

func New

func New(config *common.Config, plex *apps.PlexConfig) *Action

New configures the library.

func (*Action) Create added in v0.4.0

func (a *Action) Create()

Run initializes the library.

func (*Action) GetSessions

func (a *Action) GetSessions(ctx context.Context) (*plex.Sessions, error)

GetSessions returns the plex sessions up to 1 minute old. This uses a channel so concurrent requests are avoided.

func (*Action) Send

func (a *Action) Send(event website.EventType)

SendPlexSessions sends plex sessions in a go routine through a channel.

func (*Action) SendWebhook

func (a *Action) SendWebhook(hook *plex.IncomingWebhook)

SendWebhook is called in a go routine after a plex media.play webhook is received.

Jump to

Keyboard shortcuts

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