/// <summary> /// Retrieve a list of recordings belonging to the call used to make the request /// </summary> /// <param name="pathCallSid"> The Call SID of the resource(s) to read </param> /// <param name="pathAccountSid"> The SID of the Account that created the resource(s) to read </param> /// <param name="dateCreatedBefore"> The `YYYY-MM-DD` value of the resources to read </param> /// <param name="dateCreated"> The `YYYY-MM-DD` value of the resources to read </param> /// <param name="dateCreatedAfter"> The `YYYY-MM-DD` value of the resources to read </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Recording </returns> public static async System.Threading.Tasks.Task <ResourceSet <RecordingResource> > ReadAsync(string pathCallSid, string pathAccountSid = null, DateTime?dateCreatedBefore = null, DateTime?dateCreated = null, DateTime?dateCreatedAfter = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadRecordingOptions(pathCallSid) { PathAccountSid = pathAccountSid, DateCreatedBefore = dateCreatedBefore, DateCreated = dateCreated, DateCreatedAfter = dateCreatedAfter, PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of recordings belonging to the call used to make the request /// </summary> /// <param name="options"> Read Recording parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Recording </returns> public static async System.Threading.Tasks.Task <ResourceSet <RecordingResource> > ReadAsync(ReadRecordingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <RecordingResource> .FromJson("recordings", response.Content); return(new ResourceSet <RecordingResource>(page, options, client)); }