MAJOR
version bumps will have upgrade notes posted here.
We ensured that you can upgrade to Csharp helper Library 7.0.0 version without any api breaking changes
Support for JSON payloads has been added in the request body
Twilio Csharp Helper Library’s major version 6.0.1 is now available. We ensured that you can upgrade to Csharp helper Library 6.0.1 version without any breaking changes
Behind the scenes Csharp Helper is now auto-generated via OpenAPI with this release. This enables us to rapidly add new features and enhance consistency across versions and languages.
This was changed to add support for time-to-live to Sync objects. Users can now either provide either data
, ttl
, or both.
This only affects users who pass the twilioRestClient
parameter to the Affected Resources below.
- DocumentResource.Update(...)
- SyncListItemResource.Update(...)
- SyncMapItemResource.Update(...)
using Twilio.Rest.Sync.V1.Service;
using Twilio.Rest.Sync.V1.Service.SyncList;
using Twilio.Rest.Sync.V1.Service.SyncMap;
DocumentResource.Update("IS123", "ET123", "{}", twilioRestClient);
SyncListItemResource.Update("IS123", "ES123", 1, "{}", twilioRestClient);
SyncMapItemResource.Update("IS123", "MP123", "myKey" "{}", twilioRestClient);
using Twilio.Rest.Sync.V1.Service;
using Twilio.Rest.Sync.V1.Service.SyncList;
using Twilio.Rest.Sync.V1.Service.SyncMap;
DocumentResource.Update("IS123", "ET123", "{}", null, twilioRestClient);
SyncListItemResource.Update("IS123", "ES123", 1, "{}", null, twilioRestClient);
SyncMapItemResource.Update("IS123", "MP123", "myKey" "{}", null, twilioRestClient);
We decided to reorganize the TwiML directory now that we are generating TwiML resources for clarity as we add more and more twiml elements and types of twiml elements.
Previously all TwiML resources were under the Twilio.TwiML
namespace.
- Moved to
Twilio.TwiML.Voice
- Dial
- Gather
- Moved to
Twilio.TwiML.Messaging
- Message
using Twilio.TwiML;
var vr = new VoiceResponse();
var mr = new MessagingResponse();
var gather = new Gather();
var dial = new Dial();
var msg = new Message();
using Twilio.TwiML;
using Twilio.TwiML.Voice;
using Twilio.TwiML.Messaging;
// Still in Twilio.TwiML
var vr = new VoiceResponse();
var mr = new MessagingResponse();
// Now in Twilio.TwiML.Voice
var gather = new Gather();
var dial = new Dial();
// Now in Twilio.TwiML.Messaging
var msg = new Message();
Generating TwiML classes allowed us to use the correct types where appropriate to give a better IDE
experience. While most custom types have been written in a backwards compatible way to still accept
string values, we could not do the same for the System.Uri
type.
- VoiceResponse
- MesagingResponse
- Message
- Gather
- Dial
using Twilio.TwiML;
var vr = new VoiceResponse().Dial(recordingStatusCallback: "http://example.com/")
.Enqueue(waitUrl: "http://example.com/");
var msg = new Message(statusCallback: "http://example.com/");
using Twilio.TwiML;
using Twilio.TwiML.Messaging;
using System;
var vr = new VoiceResponse().Dial(recordingStatusCallback: new Uri("http://example.com/"))
.Enqueue(waitUrl: new Uri("http://example.com/"));
var msg = new Message(statusCallback: new Uri("http://example.com/"));
This was changed to add support for sending media in Chat messages, users can now either provide a body
or a media_sid
.
using Twilio.Rest.Chat.V2.Message;
var newMessage = MessageResource.Create("IS123", "CH123", "this is the body", from: "me");
using Twilio.Rest.Chat.V2.Message;
var newMessage = MessageResource.Create("IS123", "CH123", from:"me", body: "this is the body");
This was done to avoid a class name conflict with another resource.
using Twilio.Rest.Video.V1.Room;
var roomRecordings = RecordingResource.Read();
using Twilio.Rest.Video.V1.Room;
var roomRecordings = RoomRecordingResource.Read();