Class: ParticipantList

Twilio.Video.V1.RoomContext.ParticipantList(version, roomSid)

new ParticipantList(version, roomSid)

Initialize the ParticipantList
Parameters:
Name Type Description
version Twilio.Video.V1 Version of the resource
roomSid string The SID of the participant's room
Source:

Methods

each(optsopt, callbackopt)

Streams ParticipantInstance records from the API. This operation lazily loads records as efficiently as possible until the limit is reached. The results are passed into the callback function, so this operation is memory efficient. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
status participant.status <optional>
Read only the participants with this status
identity string <optional>
Read only the Participants with this user identity value
dateCreatedAfter Date <optional>
Read only Participants that started after this date in UTC ISO 8601 format
dateCreatedBefore Date <optional>
Read only Participants that started before this date in ISO 8601 format
limit number <optional>
Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
Number of records to fetch per request, when not set will use the default value of 50 records. If no pageSize is defined but a limit is defined, each() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Function to process each record. If this and a positional callback are passed, this one will be used
done function <optional>
Function to be called upon completion of streaming
callback function <optional>
Function to process each record
Source:

get(sid) → {Twilio.Video.V1.RoomContext.ParticipantContext}

Constructs a participant
Parameters:
Name Type Description
sid string The SID that identifies the resource to fetch
Source:
Returns:
Type
Twilio.Video.V1.RoomContext.ParticipantContext

getPage(targetUrlopt, callbackopt) → {Promise}

Retrieve a single target page of ParticipantInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
targetUrl string <optional>
API-generated URL for the requested results page
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

list(optsopt, callbackopt) → {Promise}

Lists ParticipantInstance records from the API as a list. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
status participant.status <optional>
Read only the participants with this status
identity string <optional>
Read only the Participants with this user identity value
dateCreatedAfter Date <optional>
Read only Participants that started after this date in UTC ISO 8601 format
dateCreatedBefore Date <optional>
Read only Participants that started before this date in ISO 8601 format
limit number <optional>
Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

page(optsopt, callbackopt) → {Promise}

Retrieve a single page of ParticipantInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
status participant.status <optional>
Read only the participants with this status
identity string <optional>
Read only the Participants with this user identity value
dateCreatedAfter Date <optional>
Read only Participants that started after this date in UTC ISO 8601 format
dateCreatedBefore Date <optional>
Read only Participants that started before this date in ISO 8601 format
pageToken string <optional>
PageToken provided by the API
pageNumber number <optional>
Page Number, this value is simply for client state
pageSize number <optional>
Number of records to return, defaults to 50
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object