pub struct Client { /* private fields */ }Expand description
An asynchronous Sobry API client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: impl AsRef<str>) -> Result<Self, Error>
pub fn new(api_key: impl AsRef<str>) -> Result<Self, Error>
Creates a client for a Sobry contract API key.
Sourcepub fn builder(api_key: impl AsRef<str>) -> ClientBuilder
pub fn builder(api_key: impl AsRef<str>) -> ClientBuilder
Starts configuring a client.
Sourcepub async fn daily_prices(
&self,
request: &DailyPricesRequest,
) -> Result<Vec<DailyPrice>, Error>
pub async fn daily_prices( &self, request: &DailyPricesRequest, ) -> Result<Vec<DailyPrice>, Error>
Returns daily contract prices for the requested date range.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more