Class EventReader
- java.lang.Object
-
- com.twilio.base.Reader<Event>
-
- com.twilio.rest.taskrouter.v1.workspace.EventReader
-
-
Constructor Summary
Constructors Constructor Description EventReader(String pathWorkspaceSid)
Construct a new EventReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page<Event>
firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.Page<Event>
getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.Page<Event>
nextPage(Page<Event> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.Page<Event>
previousPage(Page<Event> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.ResourceSet<Event>
read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.EventReader
setEndDate(org.joda.time.DateTime endDate)
Filter events by an end date.EventReader
setEventType(String eventType)
Filter events by those of a certain event type.EventReader
setMinutes(Integer minutes)
Filter events by up to 'x' minutes in the past.EventReader
setReservationSid(String reservationSid)
Filter events by those pertaining to a particular reservation.EventReader
setSid(String sid)
Filter events by those pertaining to a particular event.EventReader
setStartDate(org.joda.time.DateTime startDate)
Filter events by a start date.EventReader
setTaskChannel(String taskChannel)
Filter events by those pertaining to a particular task channel.EventReader
setTaskQueueSid(String taskQueueSid)
Filter events by those pertaining to a particular queue.EventReader
setTaskSid(String taskSid)
Filter events by those pertaining to a particular task.EventReader
setWorkerSid(String workerSid)
Filter events by those pertaining to a particular worker.EventReader
setWorkflowSid(String workflowSid)
Filter events by those pertaining to a particular workflow.
-
-
-
Constructor Detail
-
EventReader
public EventReader(String pathWorkspaceSid)
Construct a new EventReader.- Parameters:
pathWorkspaceSid
- Filter events by those pertaining to a particular workspace
-
-
Method Detail
-
setEndDate
public EventReader setEndDate(org.joda.time.DateTime endDate)
Filter events by an end date. This is helpful for defining a range of events to capture. Input is a GMT ISO 8601 Timestamp..- Parameters:
endDate
- Filter events by an end date.- Returns:
- this
-
setEventType
public EventReader setEventType(String eventType)
Filter events by those of a certain event type.- Parameters:
eventType
- Filter events by those of a certain event type- Returns:
- this
-
setMinutes
public EventReader setMinutes(Integer minutes)
Filter events by up to 'x' minutes in the past. This is helpful for events for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. Defaults to 15 minutes..- Parameters:
minutes
- Filter events by up to 'x' minutes in the past.- Returns:
- this
-
setReservationSid
public EventReader setReservationSid(String reservationSid)
Filter events by those pertaining to a particular reservation.- Parameters:
reservationSid
- Filter events by those pertaining to a particular reservation- Returns:
- this
-
setStartDate
public EventReader setStartDate(org.joda.time.DateTime startDate)
Filter events by a start date. This is helpful for defining a range of events to capture. Input is a GMT ISO 8601 Timestamp..- Parameters:
startDate
- Filter events by a start date.- Returns:
- this
-
setTaskQueueSid
public EventReader setTaskQueueSid(String taskQueueSid)
Filter events by those pertaining to a particular queue.- Parameters:
taskQueueSid
- Filter events by those pertaining to a particular queue- Returns:
- this
-
setTaskSid
public EventReader setTaskSid(String taskSid)
Filter events by those pertaining to a particular task.- Parameters:
taskSid
- Filter events by those pertaining to a particular task- Returns:
- this
-
setWorkerSid
public EventReader setWorkerSid(String workerSid)
Filter events by those pertaining to a particular worker.- Parameters:
workerSid
- Filter events by those pertaining to a particular worker- Returns:
- this
-
setWorkflowSid
public EventReader setWorkflowSid(String workflowSid)
Filter events by those pertaining to a particular workflow.- Parameters:
workflowSid
- Filter events by those pertaining to a particular workflow- Returns:
- this
-
setTaskChannel
public EventReader setTaskChannel(String taskChannel)
Filter events by those pertaining to a particular task channel.- Parameters:
taskChannel
- Filter events by those pertaining to a particular task channel- Returns:
- this
-
setSid
public EventReader setSid(String sid)
Filter events by those pertaining to a particular event.- Parameters:
sid
- Filter events by those pertaining to a particular event- Returns:
- this
-
read
public ResourceSet<Event> read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.
-
firstPage
public Page<Event> firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.
-
getPage
public Page<Event> getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.
-
nextPage
public Page<Event> nextPage(Page<Event> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.
-
previousPage
public Page<Event> previousPage(Page<Event> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.- Specified by:
previousPage
in classReader<Event>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Previous Page
-
-