Beispiel #1
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="pathRoomSid"> The SID of the room with the Participant resources to read </param>
        /// <param name="status"> Read only the participants with this status </param>
        /// <param name="identity"> Read only the Participants with this user identity value </param>
        /// <param name="dateCreatedAfter"> Read only Participants that started after this date in UTC ISO 8601 format </param>
        /// <param name="dateCreatedBefore"> Read only Participants that started before this date in ISO 8601 format </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Participant </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ParticipantResource> > ReadAsync(string pathRoomSid,
                                                                                                       ParticipantResource.StatusEnum status = null,
                                                                                                       string identity            = null,
                                                                                                       DateTime?dateCreatedAfter  = null,
                                                                                                       DateTime?dateCreatedBefore = null,
                                                                                                       int?pageSize             = null,
                                                                                                       long?limit               = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathRoomSid)
            {
                Status = status, Identity = identity, DateCreatedAfter = dateCreatedAfter, DateCreatedBefore = dateCreatedBefore, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read Participant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Participant </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ParticipantResource> > ReadAsync(ReadParticipantOptions options,
                                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <ParticipantResource> .FromJson("participants", response.Content);

            return(new ResourceSet <ParticipantResource>(page, options, client));
        }