예제 #1
0
        /// <summary>
        /// Fetch an instance of a feedback entry for a call
        /// </summary>
        /// <param name="options"> Fetch Feedback parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Fetch(FetchFeedbackOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #2
0
        /// <summary>
        /// Fetch an instance of a feedback entry for a call
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call sid that uniquely identifies the call </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Fetch(string pathCallSid, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new FetchFeedbackOptions(pathCallSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(Fetch(options, client));
        }
예제 #3
0
        /// <summary>
        /// Fetch an instance of a feedback entry for a call
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call sid that uniquely identifies the call </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Feedback </returns>
        public static async System.Threading.Tasks.Task <FeedbackResource> FetchAsync(string pathCallSid, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new FetchFeedbackOptions(pathCallSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(await FetchAsync(options, client));
        }
예제 #4
0
 private static Request BuildFetchRequest(FetchFeedbackOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Calls/" + options.PathCallSid + "/Feedback.json",
                queryParams: options.GetParams()
                ));
 }
예제 #5
0
        /// <summary>
        /// Fetch an instance of a feedback entry for a call
        /// </summary>
        /// <param name="options"> Fetch Feedback parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Feedback </returns>
        public static async System.Threading.Tasks.Task <FeedbackResource> FetchAsync(FetchFeedbackOptions options,
                                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }