Exemplo n.º 1
0
        /// <summary>
        /// Retrieve a list of all Participants in a Session.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the parent Service of the resource to read </param>
        /// <param name="pathSessionSid"> The SID of the parent Session of the resource to read </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 pathServiceSid,
                                                                                                       string pathSessionSid,
                                                                                                       int?pageSize             = null,
                                                                                                       long?limit               = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathServiceSid, pathSessionSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieve a list of all Participants in a Session.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the parent Service of the resource to read </param>
        /// <param name="pathSessionSid"> The SID of the parent Session of the resource to read </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 pathServiceSid,
                                                             string pathSessionSid,
                                                             int?pageSize             = null,
                                                             long?limit               = null,
                                                             ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathServiceSid, pathSessionSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieve a list of all Participants in a Session.
        /// </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));
        }