pub struct Events {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Events
impl Events
Sourcepub async fn list<'a>(
&'a self,
limit: Option<i64>,
page_token: Option<String>,
q: Option<String>,
) -> Result<ListEventsResponse, Error>
pub async fn list<'a>( &'a self, limit: Option<i64>, page_token: Option<String>, q: Option<String>, ) -> Result<ListEventsResponse, Error>
List events
Lists all the detailed events which occured in the inboxes of the company ordered in reverse chronological order (newest first).
⚠️ Deprecated field may be included
This route return the deprecated
last_message
conversation field for conversations associated with individual events. Please use the conversation’s_links.related.last_message
field instead.
Parameters:
limit: Option<i64>
: Max number of results per pagepage_token: Option<String>
: Token to use to request the next pageq: Option<String>
: Search query object with optional propertiesbefore
,after
, ortypes
.before
andafter
should be a timestamp in seconds with up to 3 decimal places.types
should be a list of event types.
async fn example_events_list() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::ListEventsResponse = client
.events()
.list(
Some(4 as i64),
Some("some-string".to_string()),
Some("some-string".to_string()),
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn get<'a>(
&'a self,
event_id: &'a str,
) -> Result<EventResponse, Error>
pub async fn get<'a>( &'a self, event_id: &'a str, ) -> Result<EventResponse, Error>
Get event
Fetch an event.
⚠️ Deprecated field may be included
This route return the deprecated
last_message
conversation field for conversations associated with individual events. Please use the conversation’s_links.related.last_message
field instead.
Parameters:
event_id: &'astr
: The event ID (required)
async fn example_events_get() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::EventResponse = client.events().get("some-string").await?;
println!("{:?}", result);
Ok(())
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Events
impl !RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl !UnwindSafe for Events
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more