pub struct Server {
pub myplex_api_url: Uri,
pub media_container: ServerMediaContainer,
/* private fields */
}Fields§
§myplex_api_url: Uri§media_container: ServerMediaContainerImplementations§
source§impl Server
impl Server
pub async fn new<U>(url: U, client: HttpClient) -> Result<Self>where U: Debug, Uri: TryFrom<U>, <Uri as TryFrom<U>>::Error: Into<Error>,
pub fn libraries(&self) -> Vec<Library>
sourcepub async fn transcode_artwork<W>(
&self,
art: &str,
width: u32,
height: u32,
options: ArtTranscodeOptions,
writer: W
) -> Result<()>where
W: AsyncWrite + Unpin,
pub async fn transcode_artwork<W>( &self, art: &str, width: u32, height: u32, options: ArtTranscodeOptions, writer: W ) -> Result<()>where W: AsyncWrite + Unpin,
Given the path to some item’s artwork (art or thumb properties for
example but many other types of images will work) this will request a
scaled version of that image be written to the passed writer as a JPEG.
The image will always maintain its aspect ratio.
sourcepub async fn transcode_sessions(&self) -> Result<Vec<TranscodeSession>>
pub async fn transcode_sessions(&self) -> Result<Vec<TranscodeSession>>
Retrieves a list of the current transcode sessions.
sourcepub async fn transcode_session(
&self,
session_id: &str
) -> Result<TranscodeSession>
pub async fn transcode_session( &self, session_id: &str ) -> Result<TranscodeSession>
Retrieves the transcode session with the passed ID.
sourcepub async fn item_by_id(&self, rating_key: u32) -> Result<Item>
pub async fn item_by_id(&self, rating_key: u32) -> Result<Item>
Allows retrieving media, playlists, collections and other items using their rating key.