Struct mm_client::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
A client for communicating with the Media Manager API
Methods
impl Client
[src]
fn new(key: &str, secret: &str) -> MMCResult<Client>
Generates a new client for the production Media Manager API
fn staging(key: &str, secret: &str) -> MMCResult<Client>
Generates a new client for the staging Media Manager API
fn get(&self, endpoint: Endpoints, id: &str) -> MMCResult<String>
Attempts to fetch a single object with the requested id from the requested Media Manager API endpoint
fn list(
&self,
endpoint: Endpoints,
params: Vec<(&'a str, &'a str)>
) -> MMCResult<String>
&self,
endpoint: Endpoints,
params: Vec<(&'a str, &'a str)>
) -> MMCResult<String>
Attempts to fetch a list of objects from the requested Media Manager API endpoint augmented by the requested parameters
fn create<T: Serialize>(
&self,
parent: Endpoints,
id: &str,
endpoint: Endpoints,
body: &T
) -> MMCResult<String>
&self,
parent: Endpoints,
id: &str,
endpoint: Endpoints,
body: &T
) -> MMCResult<String>
fn edit(&self, endpoint: Endpoints, id: &str) -> MMCResult<String>
Attempts to fetch the edit object specified by the Endpoints and id
fn update<T: Serialize>(
&self,
endpoint: Endpoints,
id: &str,
body: &T
) -> MMCResult<String>
&self,
endpoint: Endpoints,
id: &str,
body: &T
) -> MMCResult<String>
Attempts to update the object specified by the Endpoints and id
fn delete(&self, endpoint: Endpoints, id: &str) -> MMCResult<String>
Attempts to delete the object specified by the Endpoints and id
fn url(&self, url: &str) -> MMCResult<String>
Allows for calling any arbitrary url from the Media Manager API
fn asset(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single asset
fn changelog(&self, params: Vec<(&'a str, &'a str)>) -> MMCResult<String>
Shorthand for accessing a list of changes
fn collection(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single collection
fn collections(&self, params: Vec<(&'a str, &'a str)>) -> MMCResult<String>
Shorthand for accessing a list of collections
fn episode(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single episode
fn franchise(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single franchise
fn franchises(&self, params: Vec<(&'a str, &'a str)>) -> MMCResult<String>
Shorthand for accessing a list of franchises
fn season(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single season
fn special(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single special
fn show(&self, id: &str) -> MMCResult<String>
Shorthand for accessing a single show
fn shows(&self, params: Vec<(&'a str, &'a str)>) -> MMCResult<String>
Shorthand for accessing a list of shows