/// <summary> /// Fetch a specific member from the queue /// </summary> /// <param name="options"> Fetch Member parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Member </returns> public static MemberResource Fetch(FetchMemberOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Fetch a specific members of the queue /// </summary> /// /// <param name="options"> Fetch Member parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Member </returns> public static async System.Threading.Tasks.Task <MemberResource> FetchAsync(FetchMemberOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Fetch a specific member from the queue /// </summary> /// <param name="pathQueueSid"> The SID of the Queue in which to find the members </param> /// <param name="pathCallSid"> The Call SID of the resource(s) to fetch </param> /// <param name="pathAccountSid"> The SID of the Account that created the resource(s) to fetch </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Member </returns> public static MemberResource Fetch(string pathQueueSid, string pathCallSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new FetchMemberOptions(pathQueueSid, pathCallSid){PathAccountSid = pathAccountSid}; return Fetch(options, client); }
/// <summary> /// Fetch a specific member from the queue /// </summary> /// <param name="pathQueueSid"> The SID of the Queue in which to find the members </param> /// <param name="pathCallSid"> The Call SID of the resource(s) to fetch </param> /// <param name="pathAccountSid"> The SID of the Account that created the resource(s) to fetch </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Member </returns> public static async System.Threading.Tasks.Task<MemberResource> FetchAsync(string pathQueueSid, string pathCallSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new FetchMemberOptions(pathQueueSid, pathCallSid){PathAccountSid = pathAccountSid}; return await FetchAsync(options, client); }
private static Request BuildFetchRequest(FetchMemberOptions options, ITwilioRestClient client) { return new Request( HttpMethod.Get, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Queues/" + options.PathQueueSid + "/Members/" + options.PathCallSid + ".json", queryParams: options.GetParams() ); }