Skip to content

Commit 15cc055

Browse files
committed
chore: gameday release
1 parent edbfb97 commit 15cc055

File tree

5 files changed

+10
-380
lines changed

5 files changed

+10
-380
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
twilio-csharp Changelog
22
=======================
33

4+
[2025-04-09] Version 6.0.0-rc.4
5+
---------------------------
6+
**Library - Chore**
7+
- Test Release must not be used.
8+
49
[2025-04-07] Version 7.10.0
510
---------------------------
611
**Library - Feature**

README.md

Lines changed: 1 addition & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -1,194 +1,3 @@
11
# twilio-csharp
22

3-
[![Test](https://github.com/twilio/twilio-csharp/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/twilio/twilio-csharp/actions/workflows/test-and-deploy.yml)
4-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=twilio_twilio-csharp&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=twilio_twilio-csharp)
5-
[![NuGet](https://img.shields.io/nuget/v/Twilio.svg)](https://www.nuget.org/packages/Twilio)
6-
[![Learn with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twil.io/learn-open-source)
7-
8-
## Twilio REST API and TwiML Libraries for .NET
9-
10-
Twilio provides a HTTP-based API for sending and receiving phone calls and text messages. Learn more on [twilio.com][apidocs].
11-
12-
More documentation for this library can be found [here][libdocs].
13-
14-
## Versions
15-
16-
`twilio-csharp` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.
17-
18-
### Migrate from earlier versions
19-
20-
See the migration guide [here](./UPGRADE.md). Also, if you were using the `Twilio.Mvc` package, that has been replaced by the [Twilio.AspNet.Mvc][aspnet] package which is compatible with this version of the library.
21-
22-
### TLS 1.2 Requirements
23-
24-
New accounts and subaccounts are now required to use TLS 1.2 when accessing the REST API. ["Upgrade Required" errors](https://www.twilio.com/docs/api/errors/20426) indicate that TLS 1.0/1.1 is being used. With .NET, you can enable TLS 1.2 using this setting:
25-
26-
```csharp
27-
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
28-
```
29-
30-
### Supported .NET versions
31-
32-
This library supports .NET applications that utilize .NET6+.
33-
34-
## Installation
35-
36-
The best and easiest way to add the Twilio libraries to your .NET project is to use the NuGet package manager.
37-
38-
### With Visual Studio IDE
39-
40-
From within Visual Studio, you can use the NuGet GUI to search for and install the Twilio NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:
41-
42-
```shell
43-
Install-Package Twilio
44-
```
45-
46-
### With .NET Core Command Line Tools
47-
48-
If you are building with the .NET Core command line tools, then you can run the following command from within your project directory:
49-
50-
```shell
51-
dotnet add package Twilio
52-
```
53-
54-
## Sample usage
55-
56-
The examples below show how to have your application initiate and outbound phone call and send an SMS message using the Twilio .NET helper library:
57-
58-
```csharp
59-
TwilioClient.Init("ACCOUNT_SID", "AUTH_TOKEN");
60-
61-
var call = CallResource.Create(
62-
new PhoneNumber("+11234567890"),
63-
from: new PhoneNumber("+10987654321"),
64-
url: new Uri("https://my.twiml.here")
65-
);
66-
Console.WriteLine(call.Sid);
67-
68-
var message = MessageResource.Create(
69-
new PhoneNumber("+11234567890"),
70-
from: new PhoneNumber("+10987654321"),
71-
body: "Hello World!"
72-
);
73-
Console.WriteLine(message.Sid);
74-
```
75-
## OAuth Feature for Twilio APIs
76-
We are introducing Client Credentials Flow-based OAuth 2.0 authentication. This feature is currently in beta and its implementation is subject to change.
77-
78-
API examples [here](https://github.com/twilio/twilio-csharp/blob/main/examples/PublicOAuthAuthentication.md)
79-
80-
Organisation API examples [here](https://github.com/twilio/twilio-csharp/blob/main/examples/BearerTokenAuthentication.md)
81-
82-
## Specify Region and/or Edge
83-
84-
To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
85-
86-
```csharp
87-
TwilioClient.SetRegion("au1");
88-
TwilioClient.SetEdge("sydney");
89-
```
90-
91-
This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`. Use appropriate client depending on the type of authentication used
92-
93-
## Enable debug logging
94-
95-
There are two ways to enable debug logging in the default HTTP client. You can create an environment variable called `TWILIO_LOG_LEVEL` and set it to `debug` or you can set the LogLevel variable on the client as debug:
96-
97-
```csharp
98-
TwilioClient.SetLogLevel("debug");
99-
```
100-
101-
## Handle exceptions
102-
103-
For an example on how to handle exceptions in this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/csharp-dotnet/usage-guide#handle-errors).
104-
105-
## Generate TwiML
106-
107-
To control phone calls, your application needs to output [TwiML][twiml].
108-
109-
```csharp
110-
// TwiML classes can be created as standalone elements
111-
var gather = new Gather(numDigits: 1, action: new Uri("hello-monkey-handle-key.cshtml"), method: HttpMethod.Post)
112-
.Say("To speak to a real monkey, press 1. Press 2 to record your own monkey howl. Press any other key to start over.");
113-
114-
// Attributes can be set directly on the object
115-
gather.Timeout = 100;
116-
gather.MaxSpeechTime = 200
117-
118-
// Arbitrary attributes can be set by calling set/getOption
119-
var dial = new Dial().SetOption("myAttribute", 200)
120-
.SetOption("newAttribute", false);
121-
122-
// Or can be created and attached to a response directly using helper methods
123-
var response = new VoiceResponse()
124-
.Say("Hello Monkey")
125-
.Play(new Uri("http://demo.twilio.com/hellomonkey/monkey.mp3"))
126-
.Append(gather)
127-
.Append(dial);
128-
129-
// Serialize the TwiML objects to XML string
130-
Console.WriteLine(response);
131-
132-
/*
133-
<?xml version="1.0" encoding="utf-8"?>
134-
<Response>
135-
<Say>Hello Monkey</Say>
136-
<Play>http://demo.twilio.com/hellomonkey/monkey.mp3</Play>
137-
<Gather numDigits="1" action="hello-monkey-handle-key.cshtml" method="POST" timeout="100" maxSpeechTime="200">
138-
<Say>To speak to a real monkey, press 1. Press 2 to record your own monkey howl. Press any other key to start over.</Say>
139-
</Gather>
140-
<Dial myAttribute="200" newAttribute="false"></Dial>
141-
</Response>
142-
*/
143-
```
144-
145-
## Use a custom HTTP Client
146-
147-
To use a custom HTTP client with this helper library, please see the [advanced example of how to do so](./advanced-examples/custom-http-client.md).
148-
149-
## Annotations
150-
151-
### Beta
152-
Features marked with the `[Beta]` attribute are in a beta stage and may undergo changes in future releases. Use these features with caution as they may not be stable.
153-
154-
### Deprecated
155-
Features marked with the `[Deprecated]` attribute are deprecated and are not encouraged to use
156-
157-
### Preview
158-
Features marked with the `[Preview]` attribute are in a preview stage and are intended for evaluation purposes. They are subject to change and should not be used in production without thorough testing.
159-
160-
## Docker Image
161-
162-
The `Dockerfile` present in this repository and its respective `twilio/twilio-csharp` Docker image are used by Twilio for testing purposes.
163-
164-
You could use the docker image for building and running tests:
165-
166-
```bash
167-
docker build -t twiliobuild .
168-
```
169-
170-
Bash:
171-
172-
```bash
173-
docker run -it --rm -v $(pwd):/twilio twiliobuild
174-
make test
175-
```
176-
177-
Powershell:
178-
179-
```pwsh
180-
docker run -it --rm -v ${PWD}:/twilio twiliobuild
181-
make test
182-
```
183-
184-
## Get support
185-
186-
If you need help installing or using the library, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question.
187-
188-
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
189-
190-
[twilio]: https://www.twilio.com
191-
[apidocs]: https://www.twilio.com/docs/api
192-
[twiml]: https://www.twilio.com/docs/api/twiml
193-
[libdocs]: https://www.twilio.com/docs/libraries/reference/twilio-csharp/
194-
[aspnet]: https://github.com/twilio/twilio-aspnet
3+
## Test Release must not be used.

UPGRADE.md

Lines changed: 1 addition & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1,188 +1,3 @@
11
# Upgrade Guide
22

3-
_`MAJOR` version bumps will have upgrade notes posted here._
4-
5-
[2024-02-XX] 6.x.x to 7.x.x
6-
----------------------------
7-
### Overview
8-
9-
#### Twilio Csharp Helper Library’s major version 7.0.0 is now available.
10-
#### The Csharp Helper Library version 7.0.0 includes a breaking change related to .NET support.
11-
#### We ensured that you can upgrade to Csharp helper Library 7.0.0 version without any api breaking changes
12-
13-
Support for JSON payloads has been added in the request body
14-
15-
[2022-11-XX] 5.x.x to 6.x.x
16-
---------------------------
17-
### Overview
18-
19-
#### 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
20-
21-
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.
22-
23-
[2017-11-XX] 5.8.x to 5.9.x
24-
---------------------------
25-
26-
### CHANGED - Make `data` an optional parameter on Sync Document/List Item/Map Item update.
27-
28-
#### Rationale
29-
This was changed to add support for time-to-live to Sync objects. Users can now either provide either `data`, `ttl`, or both.
30-
This only affects users who pass the `twilioRestClient` parameter to the _Affected Resources_ below.
31-
32-
#### Affected Resources
33-
- DocumentResource.Update(...)
34-
- SyncListItemResource.Update(...)
35-
- SyncMapItemResource.Update(...)
36-
37-
#### 5.8.x
38-
```cs
39-
using Twilio.Rest.Sync.V1.Service;
40-
using Twilio.Rest.Sync.V1.Service.SyncList;
41-
using Twilio.Rest.Sync.V1.Service.SyncMap;
42-
43-
DocumentResource.Update("IS123", "ET123", "{}", twilioRestClient);
44-
SyncListItemResource.Update("IS123", "ES123", 1, "{}", twilioRestClient);
45-
SyncMapItemResource.Update("IS123", "MP123", "myKey" "{}", twilioRestClient);
46-
```
47-
48-
#### 5.9.x
49-
```cs
50-
using Twilio.Rest.Sync.V1.Service;
51-
using Twilio.Rest.Sync.V1.Service.SyncList;
52-
using Twilio.Rest.Sync.V1.Service.SyncMap;
53-
54-
DocumentResource.Update("IS123", "ET123", "{}", null, twilioRestClient);
55-
SyncListItemResource.Update("IS123", "ES123", 1, "{}", null, twilioRestClient);
56-
SyncMapItemResource.Update("IS123", "MP123", "myKey" "{}", null, twilioRestClient);
57-
```
58-
59-
60-
[2017-10-13] 5.7.x to 5.8.x
61-
---------------------------
62-
63-
### CHANGED - TwiML namespaces are now nested under TwiML type
64-
65-
#### Rationale
66-
We decided to reorganize the TwiML directory now that we are generating TwiML resources for clarity
67-
as we add more and more twiml elements and types of twiml elements.
68-
69-
#### Affected Resources
70-
Previously all TwiML resources were under the `Twilio.TwiML` namespace.
71-
- Moved to `Twilio.TwiML.Voice`
72-
- Dial
73-
- Gather
74-
- Moved to `Twilio.TwiML.Messaging`
75-
- Message
76-
77-
#### 5.7.x
78-
```cs
79-
using Twilio.TwiML;
80-
81-
var vr = new VoiceResponse();
82-
var mr = new MessagingResponse();
83-
84-
var gather = new Gather();
85-
var dial = new Dial();
86-
var msg = new Message();
87-
```
88-
89-
#### 5.8.x
90-
```cs
91-
using Twilio.TwiML;
92-
using Twilio.TwiML.Voice;
93-
using Twilio.TwiML.Messaging;
94-
95-
// Still in Twilio.TwiML
96-
var vr = new VoiceResponse();
97-
var mr = new MessagingResponse();
98-
99-
// Now in Twilio.TwiML.Voice
100-
var gather = new Gather();
101-
var dial = new Dial();
102-
103-
// Now in Twilio.TwiML.Messaging
104-
var msg = new Message();
105-
```
106-
107-
### CHANGED - TwiML classes now expect `Uri` type for uri parameters
108-
109-
#### Rationale
110-
Generating TwiML classes allowed us to use the correct types where appropriate to give a better IDE
111-
experience. While most custom types have been written in a backwards compatible way to still accept
112-
string values, we could not do the same for the `System.Uri` type.
113-
114-
#### Affected Resources
115-
- VoiceResponse
116-
- MesagingResponse
117-
- Message
118-
- Gather
119-
- Dial
120-
121-
#### 5.7.x
122-
```cs
123-
using Twilio.TwiML;
124-
125-
var vr = new VoiceResponse().Dial(recordingStatusCallback: "http://example.com/")
126-
.Enqueue(waitUrl: "http://example.com/");
127-
128-
var msg = new Message(statusCallback: "http://example.com/");
129-
```
130-
131-
#### 5.8.x
132-
```
133-
using Twilio.TwiML;
134-
using Twilio.TwiML.Messaging;
135-
using System;
136-
137-
var vr = new VoiceResponse().Dial(recordingStatusCallback: new Uri("http://example.com/"))
138-
.Enqueue(waitUrl: new Uri("http://example.com/"));
139-
140-
var msg = new Message(statusCallback: new Uri("http://example.com/"));
141-
```
142-
143-
144-
[2017-09-29] 5.6.x to 5.7.x
145-
---------------------------
146-
147-
### CHANGED - Make `body` and optional parameter on Chat Message creation
148-
149-
#### Rationale
150-
This was changed to add support for sending media in Chat messages, users can now either provide a `body` or a `media_sid`.
151-
152-
#### 5.6.x
153-
```cs
154-
using Twilio.Rest.Chat.V2.Message;
155-
156-
var newMessage = MessageResource.Create("IS123", "CH123", "this is the body", from: "me");
157-
```
158-
159-
#### 5.5.x
160-
```cs
161-
using Twilio.Rest.Chat.V2.Message;
162-
163-
var newMessage = MessageResource.Create("IS123", "CH123", from:"me", body: "this is the body");
164-
```
165-
166-
167-
[2017-05-22] 5.4.x to 5.5.x
168-
---------------------------
169-
170-
### CHANGED - Rename room `Recordings` class to `RoomRecordings`
171-
172-
#### Rationale
173-
This was done to avoid a class name conflict with another resource.
174-
175-
#### 5.4.x
176-
```cs
177-
using Twilio.Rest.Video.V1.Room;
178-
179-
var roomRecordings = RecordingResource.Read();
180-
```
181-
182-
#### 5.5.x
183-
```cs
184-
using Twilio.Rest.Video.V1.Room;
185-
186-
var roomRecordings = RoomRecordingResource.Read();
187-
```
188-
3+
## Test Release must nchanges.mdot be used.

0 commit comments

Comments
 (0)