Пример #1
0
        /// <summary>
        /// Fetch a specific Export Configuration.
        /// </summary>
        /// <param name="pathResourceType"> The type of communication – Messages, Calls </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ExportConfiguration </returns>
        public static async System.Threading.Tasks.Task <ExportConfigurationResource> FetchAsync(string pathResourceType,
                                                                                                 ITwilioRestClient client = null)
        {
            var options = new FetchExportConfigurationOptions(pathResourceType);

            return(await FetchAsync(options, client));
        }
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch ExportConfiguration parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ExportConfiguration </returns>
        public static ExportConfigurationResource Fetch(FetchExportConfigurationOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchExportConfigurationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/BulkExports/Exports/" + options.PathResourceType + "/Configuration",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Fetch a specific Export Configuration.
        /// </summary>
        /// <param name="pathResourceType"> The type of communication – Messages, Calls, Conferences, and Participants </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ExportConfiguration </returns>
        public static ExportConfigurationResource Fetch(string pathResourceType, ITwilioRestClient client = null)
        {
            var options = new FetchExportConfigurationOptions(pathResourceType);

            return(Fetch(options, client));
        }
        /// <summary>
        /// Fetch a specific Export Configuration.
        /// </summary>
        /// <param name="options"> Fetch ExportConfiguration parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ExportConfiguration </returns>
        public static async System.Threading.Tasks.Task <ExportConfigurationResource> FetchAsync(FetchExportConfigurationOptions options,
                                                                                                 ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }