Event Retrieval

Pre-requisite: The user has to be signed in to perform the following operations.


Get Event Tokens

To get the event token, The following method can be used:

  • spaceId (required): The space id for which the tokens is to be fetched.
Factory.spaceService.getB2AuthToken(spaceId: String) -> IVPublisher<[B2AuthTokenModel]>

Get Events

To get the list of events, The following method can be used:

  • spaceId (required): The space id for which the events are to be fetched.
  • from (required): The start time from events to be fetched from.
  • to (required): The end time upto which the events have to be fetch.
  • skip (required): The number of events to be skipped in order for pagination.
  • queryItems: [ .init(key: .startTime, value: .lessThen(value: startDate.string)), .init(key: .startTime, value: .greaterThen(value: eventsEndDate.string)), .init(key: .skip, value: .equal(value: skip.string)), .init(key: .limit, value: .equal(value: AppConfig.eventPageLimit.string)) ]
  • sortItem: .init(descending: [.startTime])
    Factory.spaceService.events(spaceId: String, queryItems: [QueryItem], sortItem: SortItem?) -> IVPublisher<ListDataModel<EventModel>>
    

Get Event

To get the event, The following method can be used:

  • spaceId (required): The space id for which the event belongs to.
  • eventId (required): The event id for which the event is to be fetched.
Factory.spaceService.event(eventId: String, spaceId: String) -> IVPublisher<EventModel>