[][src]Struct mm_client::Client

pub struct Client { /* fields omitted */ }

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]

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]

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]

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]

Attempts to create a new object of the provided Endpoints for the provided parent Endpoints

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]

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]

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]

Shorthand for accessing a single asset

pub fn assets(
    &self,
    parent_id: &str,
    parent_endpoint: Endpoints,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

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]

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]

Shorthand for accessing a single episode

pub fn episodes(
    &self,
    season_id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

Shorthand for accessing a list of episodes

pub fn franchise(
    &self,
    id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

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]

Shorthand for accessing a single season

pub fn seasons(
    &self,
    show_id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

Shorthand for accessing a list of seasons

pub fn special(
    &self,
    id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

Shorthand for accessing a single special

pub fn specials(
    &self,
    show_id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

Shorthand for accessing a list of specials

pub fn show(
    &self,
    id: &str,
    params: Option<Vec<(&'_ str, &'_ str)>>
) -> MMCResult<String>
[src]

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

impl Debug for Client[src]

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]

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument 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.