Beispiel #1
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ResourceSet <ParticipantResource> Read(string pathRoomSid,
                                                             int?pageSize             = null,
                                                             long?limit               = null,
                                                             ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathRoomSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </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,
                                                                                                       int?pageSize             = null,
                                                                                                       long?limit               = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathRoomSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Beispiel #3
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));
        }