Class MessageReader
- java.lang.Object
-
- com.twilio.base.Reader<Message>
-
- com.twilio.rest.api.v2010.account.MessageReader
-
-
Constructor Summary
Constructors Constructor Description MessageReader()
Construct a new MessageReader.MessageReader(String pathAccountSid)
Construct a new MessageReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page<Message>
firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.Page<Message>
getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.Page<Message>
nextPage(Page<Message> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.Page<Message>
previousPage(Page<Message> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.ResourceSet<Message>
read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.MessageReader
setDateSent(com.google.common.collect.Range<org.joda.time.DateTime> rangeDateSent)
The date of the messages to show.MessageReader
setDateSent(org.joda.time.DateTime absoluteDateSent)
The date of the messages to show.MessageReader
setFrom(PhoneNumber from)
Read messages sent from only this phone number or alphanumeric sender ID..MessageReader
setFrom(String from)
Read messages sent from only this phone number or alphanumeric sender ID..MessageReader
setTo(PhoneNumber to)
Read messages sent to only this phone number..MessageReader
setTo(String to)
Read messages sent to only this phone number..
-
-
-
Constructor Detail
-
MessageReader
public MessageReader()
Construct a new MessageReader.
-
MessageReader
public MessageReader(String pathAccountSid)
Construct a new MessageReader.- Parameters:
pathAccountSid
- The SID of the Account that created the resources to read
-
-
Method Detail
-
setTo
public MessageReader setTo(PhoneNumber to)
Read messages sent to only this phone number..- Parameters:
to
- Filter by messages sent to this number- Returns:
- this
-
setTo
public MessageReader setTo(String to)
Read messages sent to only this phone number..- Parameters:
to
- Filter by messages sent to this number- Returns:
- this
-
setFrom
public MessageReader setFrom(PhoneNumber from)
Read messages sent from only this phone number or alphanumeric sender ID..- Parameters:
from
- Filter by from number- Returns:
- this
-
setFrom
public MessageReader setFrom(String from)
Read messages sent from only this phone number or alphanumeric sender ID..- Parameters:
from
- Filter by from number- Returns:
- this
-
setDateSent
public MessageReader setDateSent(org.joda.time.DateTime absoluteDateSent)
The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date..- Parameters:
absoluteDateSent
- Filter by date sent- Returns:
- this
-
setDateSent
public MessageReader setDateSent(com.google.common.collect.Range<org.joda.time.DateTime> rangeDateSent)
The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date..- Parameters:
rangeDateSent
- Filter by date sent- Returns:
- this
-
read
public ResourceSet<Message> read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.
-
firstPage
public Page<Message> firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.
-
getPage
public Page<Message> getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.
-
nextPage
public Page<Message> nextPage(Page<Message> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.
-
previousPage
public Page<Message> previousPage(Page<Message> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.- Specified by:
previousPage
in classReader<Message>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Previous Page
-
-