pub struct EventsClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> EventsClient<'a>
impl<'a> EventsClient<'a>
pub fn new(client: &'a PolymarketUsClient) -> Self
Sourcepub async fn list(&self) -> Result<EventsResponse, PolymarketUsError>
pub async fn list(&self) -> Result<EventsResponse, PolymarketUsError>
List all events
Sourcepub async fn list_with_query<Q: Serialize>(
&self,
query: Option<&Q>,
) -> Result<EventsResponse, PolymarketUsError>
pub async fn list_with_query<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<EventsResponse, PolymarketUsError>
List events with query parameters
Sourcepub async fn retrieve(
&self,
event_id: &str,
) -> Result<UsEvent, PolymarketUsError>
pub async fn retrieve( &self, event_id: &str, ) -> Result<UsEvent, PolymarketUsError>
Get event by ID
Sourcepub async fn retrieve_by_slug(
&self,
slug: &str,
) -> Result<UsEvent, PolymarketUsError>
pub async fn retrieve_by_slug( &self, slug: &str, ) -> Result<UsEvent, PolymarketUsError>
Get event by slug
Trait Implementations§
Source§impl<'a> Clone for EventsClient<'a>
impl<'a> Clone for EventsClient<'a>
Source§fn clone(&self) -> EventsClient<'a>
fn clone(&self) -> EventsClient<'a>
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<'a> !RefUnwindSafe for EventsClient<'a>
impl<'a> !UnwindSafe for EventsClient<'a>
impl<'a> Freeze for EventsClient<'a>
impl<'a> Send for EventsClient<'a>
impl<'a> Sync for EventsClient<'a>
impl<'a> Unpin for EventsClient<'a>
impl<'a> UnsafeUnpin for EventsClient<'a>
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