/// <summary>
        /// Get list of recordings for given call sid.
        /// </summary>
        /// <param name="log">A logger instance.</param>
        /// <returns>A Task returning a collection of recording resources.</returns>
        public async Task <IList <RecordingResource> > FetchAccountRecordingsAsync(ILogger log)
        {
            log.LogInformation($"Attempting to fetch recordings for the current account from Twilio...");
            ResourceSet <RecordingResource> recordings = await RecordingResource.ReadAsync(pathAccountSid : _twilioClient.AccountSid, client : _twilioClient);

            return(new List <RecordingResource>(recordings));
        }
        /// <summary>
        /// Get list of recordings for given call sid.
        /// </summary>
        /// <param name="callSid">The SID of the call resource to get recordings for.</param>
        /// <param name="log">A logger instance.</param>
        /// <returns>A Task returning a collection of recording resources.</returns>
        public async Task <IList <RecordingResource> > FetchRecordingsAsync(string callSid, ILogger log)
        {
            log.LogInformation($"Attempting to fetch recordings for call '{callSid}' from Twilio...");
            ResourceSet <RecordingResource> recordings = await RecordingResource.ReadAsync(callSid : callSid, client : _twilioClient);

            return(new List <RecordingResource>(recordings));
        }
Beispiel #3
0
        public async Task <List <RecordingResource> > Recordings()
        {
            var recordings = await RecordingResource.ReadAsync(client : _client);

            return(recordings.ToList());
        }