Class RoomReader

    • Constructor Detail

      • RoomReader

        public RoomReader()
    • Method Detail

      • setStatus

        public RoomReader setStatus​(Room.RoomStatus status)
        Only show Rooms with the given status: `in-progress` (default), or `completed`.
        Parameters:
        status - Only show Rooms with the given status.
        Returns:
        this
      • setUniqueName

        public RoomReader setUniqueName​(String uniqueName)
        Only show Rooms with the provided Name..
        Parameters:
        uniqueName - Only show Rooms with the provided Name.
        Returns:
        this
      • setDateCreatedAfter

        public RoomReader setDateCreatedAfter​(org.joda.time.DateTime dateCreatedAfter)
        Only show Rooms that started on or after this date, given as `YYYY-MM-DD`..
        Parameters:
        dateCreatedAfter - Only show Rooms that started on or after this date, given as YYYY-MM-DD.
        Returns:
        this
      • setDateCreatedBefore

        public RoomReader setDateCreatedBefore​(org.joda.time.DateTime dateCreatedBefore)
        Only show Rooms that started before this date, given as `YYYY-MM-DD`..
        Parameters:
        dateCreatedBefore - Only show Rooms that started before this date, given as YYYY-MM-DD.
        Returns:
        this
      • read

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

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

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

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

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