api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(conf Config) (c *Client, err error)

func (*Client) GetLibraries

func (c *Client) GetLibraries(ctx context.Context) (libraries []Library, headers http.Header, err error)

func (*Client) ScanLibrary

func (c *Client) ScanLibrary(ctx context.Context, key, specificPath string) (headers http.Header, err error)

type Config

type Config struct {
	// Base config
	BaseURL *url.URL
	Token   string
	// Advanced config
	ProductName    string // Plex application name, eg Laika, Plex Media Server, Media Link
	ProductVersion string // Plex application version number
	ClientID       string // UUID, serial number, or other number unique per device
	CustomClient   *http.Client
}

type Library

type Library struct {
	AllowSync        bool           `json:"allowSync"`
	Art              string         `json:"art"`
	Composite        string         `json:"composite"`
	Filters          bool           `json:"filters"`
	Refreshing       bool           `json:"refreshing"`
	Thumb            string         `json:"thumb"`
	Key              string         `json:"key"`
	Type             string         `json:"type"`
	Title            string         `json:"title"`
	Agent            string         `json:"agent"`
	Scanner          string         `json:"scanner"`
	Language         string         `json:"language"`
	UUID             string         `json:"uuid"`
	UpdatedAt        time.Time      `json:"-"`
	CreatedAt        time.Time      `json:"-"`
	ScannedAt        time.Time      `json:"-"`
	Content          bool           `json:"content"`
	Directory        bool           `json:"directory"`
	ContentChangedAt int            `json:"contentChangedAt"`
	Hidden           int            `json:"hidden"`
	Locations        map[int]string `json:"-"`
}

func (*Library) MarshalJSON

func (l *Library) MarshalJSON() ([]byte, error)

func (*Library) UnmarshalJSON

func (l *Library) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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