pub struct ServerApi { /* private fields */ }Expand description
Calls on a whole server.
Implementations§
Source§impl ServerApi
impl ServerApi
pub fn new(client: RedseatClient) -> Self
pub fn client(&self) -> &RedseatClient
Sourcepub async fn get_libraries(&self) -> Result<Vec<ServerLibraryForRead>>
pub async fn get_libraries(&self) -> Result<Vec<ServerLibraryForRead>>
The libraries the user can read, as the user sees them: the server leaves out
settings and root for libraries the user does not administer.
Sourcepub async fn ping(&self, timeout: Option<Duration>) -> Result<()>
pub async fn ping(&self, timeout: Option<Duration>) -> Result<()>
Checks that the server answers, within timeout when given (else the
transport’s own).
Sourcepub async fn get_history(&self) -> Result<Vec<Watched>>
pub async fn get_history(&self) -> Result<Vec<Watched>>
What the user watched or read, on all the libraries of the server: one entry
per movie, episode or book, with its date. An entry’s id is a history id
(movie:imdb/tt0078748, episode:imdb/tt0903747/1/2…), not the id of an
item of a library.
Hides library from the user’s library lists (hidden), or shows it again: a
preference of the user, kept by the server. The library, and what its other
users see, do not change; ServerLibraryForRead::hidden says it in later
lists.
Sourcepub fn library(&self, library: ServerLibraryForRead) -> LibraryApi
pub fn library(&self, library: ServerLibraryForRead) -> LibraryApi
A LibraryApi for library.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerApi
impl !UnwindSafe for ServerApi
impl Forget for ServerApi
impl Freeze for ServerApi
impl Move for ServerApi
impl Send for ServerApi
impl Sync for ServerApi
impl Unpin for ServerApi
impl UnsafeUnpin for ServerApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more