Пример #1
0
 /// <summary>
 /// Retrieve a list of recordings belonging to the account used to make the request
 /// </summary>
 /// <param name="pathAccountSid"> The account_sid </param>
 /// <param name="dateCreatedBefore"> Filter by date created </param>
 /// <param name="dateCreated"> Filter by date created </param>
 /// <param name="dateCreatedAfter"> Filter by date created </param>
 /// <param name="callSid"> Filter by call_sid </param>
 /// <param name="pageSize"> Page size </param>
 /// <param name="limit"> Record limit </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of Recording </returns> 
 public static ResourceSet<RecordingResource> Read(string pathAccountSid = null, 
                                                   DateTime? dateCreatedBefore = null, 
                                                   DateTime? dateCreated = null, 
                                                   DateTime? dateCreatedAfter = null, 
                                                   string callSid = null, 
                                                   int? pageSize = null, 
                                                   long? limit = null, 
                                                   ITwilioRestClient client = null)
 {
     var options = new ReadRecordingOptions(){PathAccountSid = pathAccountSid, DateCreatedBefore = dateCreatedBefore, DateCreated = dateCreated, DateCreatedAfter = dateCreatedAfter, CallSid = callSid, PageSize = pageSize, Limit = limit};
     return Read(options, client);
 }
Пример #2
0
        /// <summary>
        /// Retrieve a list of recordings belonging to the account used to make the request
        /// </summary>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="dateCreatedBefore"> Filter by date created </param>
        /// <param name="dateCreated"> Filter by date created </param>
        /// <param name="dateCreatedAfter"> Filter by date created </param>
        /// <param name="callSid"> Filter by call_sid </param>
        /// <param name="conferenceSid"> The conference_sid </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 pathAccountSid      = null,
                                                                                                     DateTime?dateCreatedBefore = null,
                                                                                                     DateTime?dateCreated       = null,
                                                                                                     DateTime?dateCreatedAfter  = null,
                                                                                                     string callSid             = null,
                                                                                                     string conferenceSid       = null,
                                                                                                     int?pageSize             = null,
                                                                                                     long?limit               = null,
                                                                                                     ITwilioRestClient client = null)
        {
            var options = new ReadRecordingOptions()
            {
                PathAccountSid = pathAccountSid, DateCreatedBefore = dateCreatedBefore, DateCreated = dateCreated, DateCreatedAfter = dateCreatedAfter, CallSid = callSid, ConferenceSid = conferenceSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Пример #3
0
        /// <summary>
        /// Retrieve a list of recordings belonging to the account 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));
        }