pub struct OddsApiClient { /* private fields */ }Implementations§
Source§impl OddsApiClient
impl OddsApiClient
pub fn new(api_key: impl Into<String>) -> Result<Self>
pub fn from_env() -> Result<Self>
pub fn builder() -> OddsApiClientBuilder
pub fn api_key(&self) -> Option<&str>
pub fn base_url(&self) -> &Url
pub async fn request( &self, method: Method, path: &str, params: Option<&QueryParams>, body: Option<&Value>, ) -> Result<Value>
pub async fn get( &self, path: &str, params: Option<&QueryParams>, ) -> Result<Value>
pub async fn post( &self, path: &str, params: Option<&QueryParams>, body: &Value, ) -> Result<Value>
pub async fn list_sports(&self) -> Result<Response>
pub async fn get_api_metadata(&self) -> Result<Response>
pub async fn get_me(&self) -> Result<Response>
pub async fn get_usage(&self) -> Result<Response>
pub async fn get_limits(&self) -> Result<Response>
pub async fn list_bookmakers( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn list_bookmaker_countries(&self) -> Result<Response>
pub async fn list_leagues( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn search_events( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_event(&self, event_id: &str) -> Result<Response>
pub async fn get_event_bookmakers(&self, event_id: &str) -> Result<Response>
pub async fn get_odds_snapshot( &self, event_id: &str, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_odds_history( &self, event_id: &str, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_line_movement( &self, event_id: &str, selection_key: &str, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_bets_snapshot( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn find_positive_ev( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn find_arbitrage( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_results(&self, event_id: &str) -> Result<Response>
pub async fn search_racing_events( &self, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn get_racing_event(&self, event_id: &str) -> Result<Response>
pub async fn get_racing_odds( &self, event_id: &str, params: Option<&QueryParams>, ) -> Result<Response>
pub async fn find_best_odds( &self, event_id: &str, params: Option<&QueryParams>, ) -> Result<Vec<BestOdds>>
pub async fn compare_bookmakers( &self, event_id: &str, bookmakers: &[&str], params: Option<&QueryParams>, ) -> Result<Response>
pub fn get_market_schema(&self) -> BTreeMap<&'static str, &'static str>
pub fn url(&self, path: &str, params: Option<&QueryParams>) -> Result<Url>
Trait Implementations§
Source§impl Clone for OddsApiClient
impl Clone for OddsApiClient
Source§fn clone(&self) -> OddsApiClient
fn clone(&self) -> OddsApiClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OddsApiClient
impl !UnwindSafe for OddsApiClient
impl Freeze for OddsApiClient
impl Send for OddsApiClient
impl Sync for OddsApiClient
impl Unpin for OddsApiClient
impl UnsafeUnpin for OddsApiClient
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