Class AlertReader

    • Constructor Detail

      • AlertReader

        public AlertReader()
    • Method Detail

      • setLogLevel

        public AlertReader setLogLevel​(String logLevel)
        Only show alerts for this log-level. One of 'error', 'warning', 'notice', or 'debug'..
        Parameters:
        logLevel - Only show alerts for this log-level.
        Returns:
        this
      • setStartDate

        public AlertReader setStartDate​(org.joda.time.LocalDate startDate)
        Only show Alerts on or after this date. Useful in combination with `EndDate` to define a date-range of Alerts. Input is a [UTC ISO 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day is ignored by the filter. Queries for Alerts older than 30 days are not supported..
        Parameters:
        startDate - Only show Alerts on or after this date.
        Returns:
        this
      • setEndDate

        public AlertReader setEndDate​(org.joda.time.LocalDate endDate)
        Only show Alerts on or before this date. Useful in combination with `StartDate` to define a date-range of Alerts. Input is a [UTC ISO 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day is ignored by the filter. Queries for Alerts older than 30 days are not supported..
        Parameters:
        endDate - Only show Alerts on or before this date.
        Returns:
        this
      • read

        public ResourceSet<Alert> read​(TwilioRestClient client)
        Make the request to the Twilio API to perform the read.
        Specified by:
        read in class Reader<Alert>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Alert ResourceSet
      • firstPage

        public Page<Alert> firstPage​(TwilioRestClient client)
        Make the request to the Twilio API to perform the read.
        Specified by:
        firstPage in class Reader<Alert>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Alert ResourceSet
      • getPage

        public Page<Alert> getPage​(String targetUrl,
                                   TwilioRestClient client)
        Retrieve the target page from the Twilio API.
        Specified by:
        getPage in class Reader<Alert>
        Parameters:
        targetUrl - API-generated URL for the requested results page
        client - TwilioRestClient with which to make the request
        Returns:
        Alert ResourceSet
      • nextPage

        public Page<Alert> nextPage​(Page<Alert> page,
                                    TwilioRestClient client)
        Retrieve the next page from the Twilio API.
        Specified by:
        nextPage in class Reader<Alert>
        Parameters:
        page - current page
        client - TwilioRestClient with which to make the request
        Returns:
        Next Page
      • previousPage

        public Page<Alert> previousPage​(Page<Alert> page,
                                        TwilioRestClient client)
        Retrieve the previous page from the Twilio API.
        Specified by:
        previousPage in class Reader<Alert>
        Parameters:
        page - current page
        client - TwilioRestClient with which to make the request
        Returns:
        Previous Page