Documentation ¶
Index ¶
- Constants
- func WriteConfigFile(config Config) error
- type ApiClient
- type Config
- type ConnectionDTO
- type DeviceDTO
- type IdentityDTO
- type Preferences
- func (p *Preferences) GetCustomConnections() []string
- func (p *Preferences) GetMappedPort() string
- func (p *Preferences) GetProcessedMachineIdentifier() string
- func (p *Preferences) GetToken() string
- func (p *Preferences) MarshalXML(encoder *xml.Encoder, start xml.StartElement) error
- func (p *Preferences) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
- func (p *Preferences) Validate() error
- type PreferencesDTO
- type ResourcesDTO
- type SettingDTO
Constants ¶
View Source
const ( BaseURL = "https://plex.tv/api" SettingIDCustomConnections = "customConnections" SettingIDManualPortMappingMode = "ManualPortMappingMode" SettingIDManualPortMappingPort = "ManualPortMappingPort" SettingIDLastAutomaticMappedPort = "LastAutomaticMappedPort" )
Variables ¶
This section is empty.
Functions ¶
func WriteConfigFile ¶
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func (*ApiClient) GetIdentity ¶
func (c *ApiClient) GetIdentity() (IdentityDTO, error)
func (*ApiClient) GetPreferences ¶
func (c *ApiClient) GetPreferences() (PreferencesDTO, error)
func (*ApiClient) GetResources ¶
func (c *ApiClient) GetResources() (ResourcesDTO, error)
func (*ApiClient) UpdateCustomConnections ¶
type ConnectionDTO ¶
type DeviceDTO ¶
type DeviceDTO struct { Name string `xml:"name,attr"` Product string `xml:"product,attr"` ClientIdentifier string `xml:"clientIdentifier,attr"` Connections []ConnectionDTO `xml:"Connection"` }
func (DeviceDTO) GetLocalConnection ¶
func (d DeviceDTO) GetLocalConnection() (ConnectionDTO, error)
func (DeviceDTO) GetPlexDirectHostname ¶
func (DeviceDTO) GetRemoteConnection ¶
func (d DeviceDTO) GetRemoteConnection() (ConnectionDTO, error)
type IdentityDTO ¶
type IdentityDTO struct {
MachineIdentifier string `xml:"machineIdentifier,attr"`
}
type Preferences ¶
func (*Preferences) GetCustomConnections ¶
func (p *Preferences) GetCustomConnections() []string
func (*Preferences) GetMappedPort ¶
func (p *Preferences) GetMappedPort() string
func (*Preferences) GetProcessedMachineIdentifier ¶
func (p *Preferences) GetProcessedMachineIdentifier() string
func (*Preferences) GetToken ¶
func (p *Preferences) GetToken() string
func (*Preferences) MarshalXML ¶
func (p *Preferences) MarshalXML(encoder *xml.Encoder, start xml.StartElement) error
func (*Preferences) UnmarshalXML ¶
func (p *Preferences) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
func (*Preferences) Validate ¶
func (p *Preferences) Validate() error
type PreferencesDTO ¶
type PreferencesDTO struct {
Settings []SettingDTO `xml:"Setting"`
}
func (PreferencesDTO) GetSettingByID ¶
func (p PreferencesDTO) GetSettingByID(id string) (SettingDTO, error)
type ResourcesDTO ¶
type ResourcesDTO struct {
Devices []DeviceDTO `xml:"Device"`
}
func (ResourcesDTO) GetDeviceByIdentifier ¶
func (r ResourcesDTO) GetDeviceByIdentifier(clientIdentifier string) (DeviceDTO, error)
type SettingDTO ¶
type SettingDTO struct { ID string `xml:"id,attr"` Type string `xml:"type,attr"` Value string `xml:"value,attr"` }
func (SettingDTO) IsEnabledBoolSetting ¶
func (s SettingDTO) IsEnabledBoolSetting() bool
Click to show internal directories.
Click to hide internal directories.