Versions in this module Expand all Collapse all v2 v2.23.1 Nov 21, 2026 v2.23.0 Nov 19, 2026 Changes in this version + const ClientsBaseURL + const DefaultServerURL + const TVBaseURL + var ErrNotFound = errors.New("plex: not found") + var ErrPinExpired = errors.New("plex link code expired") + func ClientIdentifier(cfg *config.Instance) string + func Launchers() []platforms.Launcher + func NewPlexAlbumLauncher() platforms.Launcher + func NewPlexArtistLauncher() platforms.Launcher + func NewPlexMovieLauncher() platforms.Launcher + func NewPlexSongLauncher() platforms.Launcher + func NewPlexTVLauncher() platforms.Launcher + func NewPlexTVShowLauncher() platforms.Launcher + func NormalizeURL(raw string) string + type Client struct + func NewClient(serverURL, clientsURL, clientID, playerName string, httpClient *http.Client) *Client + func (c *Client) AccountToken() string + func (c *Client) ClientIdentifier() string + func (c *Client) Clients(ctx context.Context) ([]ServerClient, error) + func (c *Client) CreatePlayQueue(ctx context.Context, machineID, ratingKey, queueType string) (*PlayQueue, error) + func (c *Client) Identity(ctx context.Context) (*Identity, error) + func (c *Client) Items(ctx context.Context, sectionKey string, plexType int, filter url.Values, ...) error + func (c *Client) Leaves(ctx context.Context, ratingKey string, fn func([]Metadata) error) error + func (c *Client) Metadata(ctx context.Context, ratingKey string) (*Metadata, error) + func (c *Client) PlayerName() string + func (c *Client) PlayerResources(ctx context.Context) ([]Resource, error) + func (c *Client) Sections(ctx context.Context) ([]Section, error) + func (c *Client) ServerToken() string + func (c *Client) ServerURL() string + type Connection struct + Address string + Local bool + Port FlexInt + Protocol string + Relay bool + URI string + type FlexInt int64 + func (f *FlexInt) UnmarshalJSON(data []byte) error + type GUID struct + ID string + type Identity struct + MachineIdentifier string + Version string + type Metadata struct + GUID string + GUIDs []GUID + GrandparentTitle string + Index FlexInt + Key string + LibrarySectionID FlexInt + ParentIndex FlexInt + ParentRatingKey string + ParentTitle string + PlayQueueItemID FlexInt + RatingKey string + Title string + Type string + Year FlexInt + type Pin struct + AuthToken string + Code string + ExpiresAt time.Time + ExpiresIn FlexInt + ID FlexInt + type PlayQueue struct + ID int64 + Items []Metadata + SelectedItemID int64 + func (q *PlayQueue) SelectedItem() *Metadata + type PlexClient interface + AccountToken func() string + ClientIdentifier func() string + Clients func(ctx context.Context) ([]ServerClient, error) + CreatePlayQueue func(ctx context.Context, machineID, ratingKey, queueType string) (*PlayQueue, error) + Identity func(ctx context.Context) (*Identity, error) + Items func(ctx context.Context, sectionKey string, plexType int, filter url.Values, ...) error + Leaves func(ctx context.Context, ratingKey string, fn func([]Metadata) error) error + Metadata func(ctx context.Context, ratingKey string) (*Metadata, error) + PlayerName func() string + PlayerResources func(ctx context.Context) ([]Resource, error) + Sections func(ctx context.Context) ([]Section, error) + ServerToken func() string + ServerURL func() string + func NewClientWithLauncherID(cfg *config.Instance, launcherID string, groups []string) PlexClient + type Resource struct + AccessToken string + ClientIdentifier string + Connections []Connection + Name string + Owned bool + Product string + Provides string + func (r *Resource) ProvidesRole(role string) bool + type Section struct + Key string + Title string + Type string + type ServerClient struct + Address string + Host string + MachineIdentifier string + Name string + Port FlexInt + Product string + ProtocolCapabilities string + type TVClient struct + func NewTVClient(baseURL, clientsURL, clientID string, httpClient *http.Client) *TVClient + func (c *TVClient) CheckPin(ctx context.Context, id int64) (*Pin, error) + func (c *TVClient) ClientsURL() string + func (c *TVClient) CreatePin(ctx context.Context) (*Pin, error) + func (c *TVClient) Resources(ctx context.Context, token string) ([]Resource, error)