[][src]Struct plex_api::MyPlexAccount

pub struct MyPlexAccount { /* fields omitted */ }

Methods

impl MyPlexAccount[src]

pub async fn login<'_, '_>(username: &'_ str, password: &'_ str) -> Result<Self>[src]

Log in to MyPlex using username and password.

pub async fn by_token<'_>(auth_token: &'_ str) -> Result<Self>[src]

Log in to MyPlex using existing authentication token.

impl MyPlexAccount[src]

pub async fn get_claim_token<'_>(&'_ self) -> Result<String>[src]

Returns a token which can help you to claim freshly installed Plex Server.

See https://www.plex.tv/claim, docker:plexinc/pms-docker.

impl MyPlexAccount[src]

pub async fn get_devices<'_>(&'_ self) -> Result<Vec<Device>>[src]

Returns the list of devices (players and servers), registered with current MyPlex account.

impl MyPlexAccount[src]

pub async fn get_privacy<'_>(&'_ self) -> Result<Privacy>[src]

Returns current privacy settings, see Privacy Preferences on plex.tv.

pub async fn set_privacy<'_>(
    &'_ self,
    opt_out_playback: bool,
    opt_out_library_stats: bool
) -> Result<()>
[src]

Changes privacy settings, see Privacy Preferences on plex.tv.

impl MyPlexAccount[src]

pub async fn get_resources<'_>(&'_ self) -> Result<Vec<Device>>[src]

Returns the list of resources, registered with current MyPlex account.

Resource is any available device, despite of its provides setting.

impl MyPlexAccount[src]

pub async fn get_users<'_>(&'_ self) -> Result<Vec<User>>[src]

Returns a list of users, who has access to the current server, except the owner.

impl MyPlexAccount[src]

pub async fn get_webhooks<'_>(&'_ self) -> Result<Vec<String>>[src]

Returns a list of URLs for currently registered WebHooks.

pub async fn set_webhooks<'_, '_, '_>(
    &'_ self,
    webhooks: &'_ [&'_ str]
) -> Result<()>
[src]

Sets a list of WebHooks to provided URLs list.

pub async fn add_webhook<'_, '_>(&'_ self, webhook: &'_ str) -> Result<()>[src]

Add an URL to webhooks list.

pub async fn del_webhook<'_, '_>(&'_ self, webhook: &'_ str) -> Result<()>[src]

Deletes provided URL from webhooks list.

impl MyPlexAccount[src]

pub fn get_username(&self) -> String[src]

Return username which was used to log in to MyPlex.

Trait Implementations

impl Debug for MyPlexAccount[src]

impl<'de> Deserialize<'de> for MyPlexAccount[src]

impl HasMyPlexToken for MyPlexAccount[src]

fn get_auth_token(&self) -> &str[src]

Returns authentication token for current account.

fn set_auth_token(&mut self, auth_token: &str)[src]

Sets authentication token for current account.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,