[−][src]Struct mm_client::Client
A client for communicating with the Media Manager API
Implementations
impl Client
[src]
pub fn new(key: &str, secret: &str) -> MMCResult<Client>
[src]
Generates a new client for the production Media Manager API
pub fn staging(key: &str, secret: &str) -> MMCResult<Client>
[src]
Generates a new client for the staging Media Manager API
pub fn get(
&self,
endpoint: Endpoints,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
endpoint: Endpoints,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Attempts to fetch a single object with the requested id from the requested Media Manager API endpoint
pub fn list(
&self,
endpoint: Endpoints,
params: Vec<(&'_ str, &'_ str)>
) -> MMCResult<String>
[src]
&self,
endpoint: Endpoints,
params: Vec<(&'_ str, &'_ str)>
) -> MMCResult<String>
Attempts to fetch a list of objects from the requested Media Manager API endpoint augmented by the requested parameters
pub fn child_list(
&self,
endpoint: Endpoints,
parent_id: &str,
parent_endpoint: Endpoints,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
endpoint: Endpoints,
parent_id: &str,
parent_endpoint: Endpoints,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Attempts to fetch a list of child objects of the requested Media Manager API type belonging to the requested parent object augmeted by the requested parameters
pub fn create<T: Serialize>(
&self,
parent: Endpoints,
id: &str,
endpoint: Endpoints,
body: &T
) -> MMCResult<String>
[src]
&self,
parent: Endpoints,
id: &str,
endpoint: Endpoints,
body: &T
) -> MMCResult<String>
pub fn edit(&self, endpoint: Endpoints, id: &str) -> MMCResult<String>
[src]
Attempts to fetch the edit object specified by the Endpoints and id
pub fn update<T: Serialize>(
&self,
endpoint: Endpoints,
id: &str,
body: &T
) -> MMCResult<String>
[src]
&self,
endpoint: Endpoints,
id: &str,
body: &T
) -> MMCResult<String>
Attempts to update the object specified by the Endpoints and id
pub fn delete(&self, endpoint: Endpoints, id: &str) -> MMCResult<String>
[src]
Attempts to delete the object specified by the Endpoints and id
pub fn change_parent(
&self,
parent_endpoint: Endpoints,
parent_id: &str,
child_endpoint: Endpoints,
child_id: &str
) -> MMCResult<String>
[src]
&self,
parent_endpoint: Endpoints,
parent_id: &str,
child_endpoint: Endpoints,
child_id: &str
) -> MMCResult<String>
Attempts to change the parent of an object
pub fn url(&self, url: &str) -> MMCResult<String>
[src]
Allows for calling any arbitrary url from the Media Manager API
pub fn asset(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single asset
pub fn assets(
&self,
parent_id: &str,
parent_endpoint: Endpoints,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
parent_id: &str,
parent_endpoint: Endpoints,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a list of assets
pub fn changelog(&self, params: Vec<(&'_ str, &'_ str)>) -> MMCResult<String>
[src]
Shorthand for accessing a list of changes
pub fn collection(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single collection
pub fn collections(&self, params: Vec<(&'_ str, &'_ str)>) -> MMCResult<String>
[src]
Shorthand for accessing a list of collections
pub fn episode(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single episode
pub fn episodes(
&self,
season_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
season_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a list of episodes
pub fn franchise(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single franchise
pub fn franchises(&self, params: Vec<(&'_ str, &'_ str)>) -> MMCResult<String>
[src]
Shorthand for accessing a list of franchises
pub fn season(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single season
pub fn seasons(
&self,
show_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
show_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a list of seasons
pub fn special(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single special
pub fn specials(
&self,
show_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
show_id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a list of specials
pub fn show(
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]
&self,
id: &str,
params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
Shorthand for accessing a single show
pub fn shows(&self, params: Vec<(&'_ str, &'_ str)>) -> MMCResult<String>
[src]
Shorthand for accessing a list of shows
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,