Skip to content

Commit e89c430

Browse files
authored
Merge pull request TwilioDevEd#565 from TwilioDevEd/fix-voice-recording-range-snippet
Fix snippets with missing range
2 parents 85027b8 + 7e9e332 commit e89c430

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
// Download the twilio-csharp library from twilio.com/docs/csharp/install
22
using System;
33
using Twilio;
4-
class Example
4+
class Example
55
{
6-
static void Main(string[] args)
6+
static void Main(string[] args)
77
{
88
// Find your Account Sid and Auth Token at twilio.com/user/account
99
string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
1010
string AuthToken = "your_auth_token";
1111
var twilio = new TwilioRestClient(AccountSid, AuthToken);
1212

13-
var recordings = twilio.ListRecordings(null, null, null, null);
14-
13+
var recordings = twilio.ListRecordings(
14+
null,
15+
dateCreatedLessThanOrEqual: new DateTime(2016, 10, 15),
16+
dateCreatedGreaterThanOrEqual: new DateTime(2016, 10, 12)
17+
);
18+
1519
foreach (var recording in recordings.Recordings)
1620
{
1721
Console.WriteLine(recording.Duration);
1822
}
1923
}
20-
}
24+
}

rest/recording/list-get-example-4/list-get-example-4.5.x.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ static void Main(string[] args)
1212
const string authToken = "your_auth_token";
1313
TwilioClient.Init(accountSid, authToken);
1414

15-
var recordings = RecordingResource.Read();
15+
var recordings = RecordingResource.Read(
16+
dateCreatedBefore: new DateTime(2016, 10, 15),
17+
dateCreatedAfter: new DateTime(2016, 10, 12)
18+
);
1619

1720
foreach (var recording in recordings)
1821
{

rest/recording/list-get-example-4/list-get-example-4.5.x.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
# Loop over recordings and print out a property for each one
1212
@client.recordings.list(
13-
date_created: Time.new('2009-07-06')
13+
date_created_before: Time.new('2016-10-15'),
14+
date_created_after: Time.new('2016-10-12')
1415
).each do |recording|
1516
puts recording.duration
1617
end

0 commit comments

Comments
 (0)