Client

Struct Client 

Source
pub struct Client {
    pub client: ClientWithMiddleware,
    pub api_url: &'static str,
    /* private fields */
}
Expand description

Client struct used for connecting with coinpaprika.com

Fields§

§client: ClientWithMiddleware§api_url: &'static str

Implementations§

Source§

impl Client

Source

pub fn new() -> Self

Source

pub fn with_key(key: &str) -> Self

Function to create Client with API Key

Source

pub async fn request(&self, request: RequestBuilder) -> Result<Response, Error>

Source

pub fn key_info(&self) -> GetKeyInfoRequest<'_>

Call to /key/info

Source

pub fn global(&self) -> GetGlobalRequest<'_>

Call to /global

Source

pub fn coins(&self) -> GetCoinsRequest<'_>

Call to /coins

Source

pub fn coin(&self, coin_id: &str) -> GetCoinRequest<'_>

Source

pub fn twitter(&self, coin_id: &str) -> GetTwitterRequest<'_>

Source

pub fn coin_events(&self, coin_id: &str) -> GetCoinEventsRequest<'_>

Source

pub fn coin_exchanges(&self, coin_id: &str) -> GetCoinExchangesRequest<'_>

Source

pub fn coin_markets(&self, coin_id: &str) -> GetCoinMarketsRequest<'_>

Source

pub fn coin_ohlc_last_full_day( &self, coin_id: &str, ) -> GetCoinOHLCLastFullDayRequest<'_>

Source

pub fn coin_ohlc_historical( &self, coin_id: &str, ) -> GetCoinOHLCHistoricalRequest<'_>

Source

pub fn coin_ohlc_today(&self, coin_id: &str) -> GetCoinOHLCTodayRequest<'_>

Source

pub fn person(&self, person_id: &str) -> GetPersonRequest<'_>

Source

pub fn tags(&self) -> GetTagsRequest<'_>

Call to /tags

Source

pub fn tag(&self, tag_id: &str) -> GetTagRequest<'_>

Source

pub fn tickers(&self) -> GetTickersRequest<'_>

Call to /tickers

Source

pub fn ticker(&self, coin_id: &str) -> GetTickerRequest<'_>

Source

pub fn historical_ticks(&self, coin_id: &str) -> GetHistoricalTicksRequest<'_>

Source

pub fn exchanges(&self) -> GetExchangesRequest<'_>

Call to /exchanges

Source

pub fn exchange(&self, exchange_id: &str) -> GetExchangeRequest<'_>

Source

pub fn exchange_markets( &self, exchange_id: &str, ) -> GetExchangeMarketsRequest<'_>

Source

pub fn search(&self, q: &str) -> GetSearchRequest<'_>

Call to /search

Source

pub fn price_convert( &self, base_currency_id: &str, quote_currency_id: &str, ) -> GetPriceConversionRequest<'_>

Source

pub fn contract_platforms(&self) -> GetContractPlatformsRequest<'_>

Call to /contracts

Source

pub fn contracts(&self, platform_id: &str) -> GetContractsRequest<'_>

Source

pub fn changelog(&self, page: i32) -> GetChangelogRequest<'_>

Trait Implementations§

Source§

impl Default for Client

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,