/// <summary>
        /// Returns a single Composition Hook Instance resource identified by a CompositionHookSid.
        /// </summary>
        /// <param name="pathSid"> The Composition Hook Sid that uniquely identifies the Composition Hook to fetch. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CompositionHook </returns>
        public static async System.Threading.Tasks.Task <CompositionHookResource> FetchAsync(string pathSid,
                                                                                             ITwilioRestClient client = null)
        {
            var options = new FetchCompositionHookOptions(pathSid);

            return(await FetchAsync(options, client));
        }
        /// <summary>
        /// Returns a single Composition Hook Instance resource identified by a CompositionHookSid.
        /// </summary>
        /// <param name="options"> Fetch CompositionHook parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CompositionHook </returns>
        public static CompositionHookResource Fetch(FetchCompositionHookOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 3
0
 private static Request BuildFetchRequest(FetchCompositionHookOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Video,
                "/v1/CompositionHooks/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Returns a single Composition Hook Instance resource identified by a CompositionHookSid.
        /// </summary>
        /// <param name="pathSid"> The Composition Hook Sid that uniquely identifies the Composition Hook to fetch. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CompositionHook </returns>
        public static CompositionHookResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchCompositionHookOptions(pathSid);

            return(Fetch(options, client));
        }
        /// <summary>
        /// Returns a single Composition Hook Instance resource identified by a CompositionHookSid.
        /// </summary>
        /// <param name="options"> Fetch CompositionHook parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CompositionHook </returns>
        public static async System.Threading.Tasks.Task <CompositionHookResource> FetchAsync(FetchCompositionHookOptions options,
                                                                                             ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }