pub struct PersonsEventsResource<'a> { /* private fields */ }Expand description
client.persons().events()
Implementations§
Source§impl<'a> PersonsEventsResource<'a>
impl<'a> PersonsEventsResource<'a>
pub fn services(&self) -> PersonsEventsServicesResource<'a>
Sourcepub fn list(
&self,
person_id: impl Display,
) -> Result<Vec<EventReadWithServices>>
pub fn list( &self, person_id: impl Display, ) -> Result<Vec<EventReadWithServices>>
Get events that person is involved with
GET /persons/{personId}/events
Returns an unpaginated list of non-cancelled events where the person has a valid assignment. Requires the current user to be this person or a super administrator. from defaults to today and is compared strictly to midnight: an event exactly at midnight is excluded, later events that day are included. Results are ordered by event start ascending with no upper date bound. Visible service assignments are always included under eventServices and are not restricted to just this person. eventFiles is present but this endpoint does not load files, so it is empty. meta.count is the number returned.
Use Self::list_with to pass query parameters.
§Example
for event in client.persons().events().list(42)? {
println!("{}", event.name);
}Sourcepub fn list_with(
&self,
person_id: impl Display,
query: &GetPersonsIdEventsQuery,
) -> Result<Vec<EventReadWithServices>>
pub fn list_with( &self, person_id: impl Display, query: &GetPersonsIdEventsQuery, ) -> Result<Vec<EventReadWithServices>>
Get events that person is involved with
Like Self::list, with query parameters.
GET /persons/{personId}/events
Returns an unpaginated list of non-cancelled events where the person has a valid assignment. Requires the current user to be this person or a super administrator. from defaults to today and is compared strictly to midnight: an event exactly at midnight is excluded, later events that day are included. Results are ordered by event start ascending with no upper date bound. Visible service assignments are always included under eventServices and are not restricted to just this person. eventFiles is present but this endpoint does not load files, so it is empty. meta.count is the number returned.