Trait quandl_v3::prelude::ApiCall
[−]
[src]
pub trait ApiCall<T: DeserializeOwned + Clone>: Has<ApiArguments> { fn url(&self) -> String { ... } fn encoded_data(&self) -> Result<Vec<u8>> { ... } fn send(&self) -> Result<T> { ... } fn fmt_prefix(&self) -> Option<String> { ... } fn fmt_arguments(&self) -> Option<String> { ... } }
Trait allowing implementers to submit a request through the Quandl API.
This trait is implemented by all queries.
Provided Methods
fn url(&self) -> String
Returns the URL that will be used to submit the query through Quandl's API.
fn encoded_data(&self) -> Result<Vec<u8>>
Bypass the parsers and retrieve the byte stream received from Quandl directly.
fn send(&self) -> Result<T>
Submit a request to the Quandl's API and return a parsed object representing the data received in a Rust-friendly format.
fn fmt_prefix(&self) -> Option<String>
If applicable, returns the string that would be appended between the QUANDL_API_URL
and
the '?' character in a query URL.
fn fmt_arguments(&self) -> Option<String>
If applicable, returns the string that would be appended after the '?' character in a query URL.
Implementors
impl ApiCall<DatabaseMetadata> for DatabaseMetadataQuery
impl ApiCall<DatasetMetadata> for DatasetMetadataQuery
impl ApiCall<DatabaseList> for DatabaseSearch
impl ApiCall<DatasetList> for DatasetSearch
impl ApiCall<Vec<Code>> for CodeListQuery
impl<T: DeserializeOwned + Clone> ApiCall<Vec<T>> for DataQuery
impl<'a, T: DeserializeOwned + Clone, A: ApiCall<T>> ApiCall<T> for &'a A
impl<'a, T: DeserializeOwned + Clone, A: ApiCall<T>> ApiCall<T> for &'a mut A