Ejemplo n.º 1
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read Query parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Query </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <QueryResource> > ReadAsync(ReadQueryOptions options,
                                                                                                 ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <QueryResource> .FromJson("queries", response.Content);

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