Example #1
0
        /// <summary>
        /// Fetch a specific Export.
        /// </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 Export </returns>
        public static async System.Threading.Tasks.Task <ExportResource> FetchAsync(string pathResourceType,
                                                                                    ITwilioRestClient client = null)
        {
            var options = new FetchExportOptions(pathResourceType);

            return(await FetchAsync(options, client));
        }
Example #2
0
        /// <summary>
        /// Fetch a specific Export.
        /// </summary>
        /// <param name="options"> Fetch Export parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Export </returns>
        public static ExportResource Fetch(FetchExportOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

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

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchExportOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Bulkexports,
                "/v1/Exports/" + options.PathResourceType + "",
                queryParams: options.GetParams()
                ));
 }
Example #5
0
        /// <summary>
        /// Fetch a specific Export.
        /// </summary>
        /// <param name="pathResourceType"> The type of communication – Messages, Calls </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Export </returns>
        public static ExportResource Fetch(string pathResourceType, ITwilioRestClient client = null)
        {
            var options = new FetchExportOptions(pathResourceType);

            return(Fetch(options, client));
        }