tautulli

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL          string `toml:"url" xml:"url" json:"url"`
	APIKey       string `toml:"api_key" xml:"api_key" json:"apiKey"`
	*http.Client `toml:"-" xml:"-" json:"-"`
}

Config is the Tautulli configuration.

func (*Config) GetInfo

func (c *Config) GetInfo(ctx context.Context) (*Info, error)

GetInfo returns the Tautulli app info.

func (*Config) GetURLInto

func (c *Config) GetURLInto(ctx context.Context, params url.Values, into interface{}) error

GetURLInto gets a url and unmarshals the contents into the provided interface pointer.

func (*Config) GetUsers

func (c *Config) GetUsers(ctx context.Context) (*Users, error)

GetUsers returns the Tautulli users.

type Info

type Info struct {
	InstallType         string `json:"tautulli_install_type"`
	Version             string `json:"tautulli_version"`
	Branch              string `json:"tautulli_branch"`
	Commit              string `json:"tautulli_commit"`
	Platform            string `json:"tautulli_platform"`
	PlatformRelease     string `json:"tautulli_platform_release"`
	PlatformVersion     string `json:"tautulli_platform_version"`
	PlatformLinuxDistro string `json:"tautulli_platform_linux_distro"`
	PlatformDeviceName  string `json:"tautulli_platform_device_name"`
	PythonVersion       string `json:"tautulli_python_version"`
}

Info represent the data returned by the get_tautulli_info command.

type User

type User struct {
	RowID           int64    `json:"row_id"`
	UserID          int64    `json:"user_id"`
	Username        string   `json:"username"`
	FriendlyName    string   `json:"friendly_name"`
	Thumb           string   `json:"thumb"`
	Email           string   `json:"email"`
	ServerToken     string   `json:"server_token"`
	SharedLibraries []string `json:"shared_libraries"`
	FilterAll       string   `json:"filter_all"`
	FilterMovies    string   `json:"filter_movies"`
	FilterTv        string   `json:"filter_tv"`
	FilterMusic     string   `json:"filter_music"`
	FilterPhotos    string   `json:"filter_photos"`
	IsActive        int      `json:"is_active"`     // 1,0 (bool)
	IsAdmin         int      `json:"is_admin"`      // 1,0 (bool)
	IsHomeUser      int      `json:"is_home_user"`  // 1,0 (bool)
	IsAllowSync     int      `json:"is_allow_sync"` // 1,0 (bool)
	IsRestricted    int      `json:"is_restricted"` // 1,0 (bool)
	DoNotify        int      `json:"do_notify"`     // 1,0 (bool)
	KeepHistory     int      `json:"keep_history"`  // 1,0 (bool)
	AllowGuest      int      `json:"allow_guest"`   // 1,0 (bool)
}

User is the user data from the get_users API call.

type Users

type Users struct {
	Response struct {
		Result  string `json:"result"`  // success, error
		Message string `json:"message"` // error msg
		Data    []User `json:"data"`
	} `json:"response"`
}

Users is the entire get_users API response.

func (*Users) MapIDName

func (u *Users) MapIDName() map[string]string

MapIDName returns a map of plex user ID => Feiendly Name (or username) for Tautulli users.

Jump to

Keyboard shortcuts

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