Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GA changes for Azure.Communication.Messages #41458

Merged
merged 51 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a5cf2dc
iteration 1, addressed renaming, reran live test recordings
glorialimicrosoft Dec 8, 2023
074ecb1
rerun with latest GA swagger, and rerun live test recordings
glorialimicrosoft Dec 8, 2023
0bed20e
revert accidental check in of recordmode change
glorialimicrosoft Dec 8, 2023
ebf469c
rename keyCredential to credential
glorialimicrosoft Dec 8, 2023
bdccd22
add SanitizedHeaders for Repeatability
glorialimicrosoft Dec 8, 2023
92e007b
Generate SDK from TypeSpec, fix convenience layers
glorialimicrosoft Dec 9, 2023
44c5d42
rerun recording
glorialimicrosoft Dec 9, 2023
dad0216
add [CodeGenModel("AzureCommunicationMessagesClientOptions")]
glorialimicrosoft Dec 9, 2023
759c1b4
use V2024_02_01 as latest
glorialimicrosoft Dec 9, 2023
9af5a6f
Update MessageTemplateItem.cs
glorialimicrosoft Dec 12, 2023
0e47997
revert accidental check in of recordmode change
glorialimicrosoft Dec 13, 2023
dd0e031
rename keyCredential to credential
glorialimicrosoft Dec 14, 2023
a63363c
attempt 1
glorialimicrosoft Dec 19, 2023
8a65759
add Kind to MessageTemplateBindings
glorialimicrosoft Dec 21, 2023
d57b1c1
rerun tests
glorialimicrosoft Dec 21, 2023
1e610b6
regenerate
glorialimicrosoft Dec 21, 2023
a4fb6f4
regenerate: Typespec with Polymorphism
glorialimicrosoft Jan 9, 2024
6c9198a
regenerate current api listing from code
DominikMe Jan 9, 2024
075356f
Azure.Communication.Messages: delete all unnecessary custom code
DominikMe Jan 10, 2024
ef96870
fix names and model sub namespace
DominikMe Jan 10, 2024
9a348b4
remove dead comments and usings
DominikMe Jan 10, 2024
87a7852
remove more dead comments
DominikMe Jan 10, 2024
b3ac2b0
change operation name from sendMessage to send
glorialimicrosoft Jan 11, 2024
710b54c
add WhatsAppMessageButtonSubType to Azure.Communication.Messages.Mode…
glorialimicrosoft Jan 11, 2024
6b53329
Use GeoPosition to represent Latitude and Longitude in MessageTemplat…
glorialimicrosoft Jan 11, 2024
3bb1210
make WhatsAppMessageTemplateBindings internal
glorialimicrosoft Jan 11, 2024
21191e1
make Latitude and Longitude internal
glorialimicrosoft Jan 11, 2024
2f36280
update api listing (please always update with Export-API.ps1)
DominikMe Jan 11, 2024
233bec4
Revert "make WhatsAppMessageTemplateBindings internal"
glorialimicrosoft Jan 17, 2024
68838ea
rerun recording
glorialimicrosoft Jan 18, 2024
498ef4f
use latestest typespec
glorialimicrosoft Jan 18, 2024
268709d
regenerate with latest typespec - rename url to uri, make downloadmed…
glorialimicrosoft Jan 19, 2024
ff0d2b1
regenerate with latest typespec - fixing some typos
glorialimicrosoft Jan 20, 2024
f5fc84d
revert accidental deletion of phoneNumber api
glorialimicrosoft Jan 23, 2024
cc0d462
regenerate from latest TypeSpec
glorialimicrosoft Jan 27, 2024
d0ff467
re-run recordings
glorialimicrosoft Jan 27, 2024
161a36c
regenerate from latest typespec
glorialimicrosoft Jan 30, 2024
7c6689b
re-run recordings
glorialimicrosoft Jan 30, 2024
232cdb0
revert accidental check in of local testing changes
glorialimicrosoft Jan 31, 2024
dee8218
add more tests
glorialimicrosoft Jan 31, 2024
6f0c8db
add more tests
glorialimicrosoft Jan 31, 2024
b176884
rerun recordings
glorialimicrosoft Jan 31, 2024
f53b946
update tests and rerun recording
glorialimicrosoft Feb 6, 2024
4907a63
fix test name
glorialimicrosoft Feb 7, 2024
80e3755
Update README.md
glorialimicrosoft Feb 7, 2024
e970a2c
regenerate and fix build pipeline issue
glorialimicrosoft Feb 8, 2024
c64e879
fix broken links in readme
glorialimicrosoft Feb 8, 2024
b2bc20d
move some tests out of live tests into tests file
glorialimicrosoft Feb 9, 2024
0b4fe33
rerun recordings
glorialimicrosoft Feb 9, 2024
244680e
re-run recording with proper recorded variables
glorialimicrosoft Feb 9, 2024
72865e4
change destination path for downloadMedia
glorialimicrosoft Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use latestest typespec
  • Loading branch information
glorialimicrosoft committed Feb 9, 2024
commit 498ef4f6bae7eb3695e96c8924fda706500c0bf0

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ MessageTemplateClient client = new MessageTemplateClient((string)null);
await foreach (BinaryData item in client.GetTemplatesAsync("<channelId>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());
}
]]></code>
This sample shows how to call GetTemplatesAsync with all parameters and parse the result.
Expand All @@ -61,10 +61,10 @@ MessageTemplateClient client = new MessageTemplateClient((string)null);
await foreach (BinaryData item in client.GetTemplatesAsync("<channelId>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());
}
]]></code></example>
</member>
Expand All @@ -77,10 +77,10 @@ MessageTemplateClient client = new MessageTemplateClient((string)null);
foreach (BinaryData item in client.GetTemplates("<channelId>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());
}
]]></code>
This sample shows how to call GetTemplates with all parameters and parse the result.
Expand All @@ -90,10 +90,10 @@ MessageTemplateClient client = new MessageTemplateClient((string)null);
foreach (BinaryData item in client.GetTemplates("<channelId>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());
}
]]></code></example>
</member>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ NotificationMessagesClient client = new NotificationMessagesClient(null);
using RequestContent content = RequestContent.Create(new
{
content = "<content>",
kind = "text",
channelRegistrationId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a",
to = new object[]
{
"<to>"
},
kind = "text",
});
Response response = await client.SendAsync(content);

Expand All @@ -64,12 +64,12 @@ NotificationMessagesClient client = new NotificationMessagesClient(null);
using RequestContent content = RequestContent.Create(new
{
content = "<content>",
kind = "text",
channelRegistrationId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a",
to = new object[]
{
"<to>"
},
kind = "text",
});
Response response = await client.SendAsync(content);

Expand All @@ -87,12 +87,12 @@ NotificationMessagesClient client = new NotificationMessagesClient(null);
using RequestContent content = RequestContent.Create(new
{
content = "<content>",
kind = "text",
channelRegistrationId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a",
to = new object[]
{
"<to>"
},
kind = "text",
});
Response response = client.Send(content);

Expand All @@ -107,18 +107,90 @@ NotificationMessagesClient client = new NotificationMessagesClient(null);
using RequestContent content = RequestContent.Create(new
{
content = "<content>",
kind = "text",
channelRegistrationId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a",
to = new object[]
{
"<to>"
},
kind = "text",
});
Response response = client.Send(content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("receipts")[0].GetProperty("messageId").ToString());
Console.WriteLine(result.GetProperty("receipts")[0].GetProperty("to").ToString());
]]></code></example>
</member>
<member name="DownloadMediaAsync(string,CancellationToken)">
<example>
This sample shows how to call DownloadMediaAsync.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response<BinaryData> response = await client.DownloadMediaAsync("<id>");
]]></code>
This sample shows how to call DownloadMediaAsync with all parameters.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response<BinaryData> response = await client.DownloadMediaAsync("<id>");
]]></code></example>
</member>
<member name="DownloadMedia(string,CancellationToken)">
<example>
This sample shows how to call DownloadMedia.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response<BinaryData> response = client.DownloadMedia("<id>");
]]></code>
This sample shows how to call DownloadMedia with all parameters.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response<BinaryData> response = client.DownloadMedia("<id>");
]]></code></example>
</member>
<member name="DownloadMediaAsync(string,RequestContext)">
<example>
This sample shows how to call DownloadMediaAsync and parse the result.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response response = await client.DownloadMediaAsync("<id>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call DownloadMediaAsync with all parameters and parse the result.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response response = await client.DownloadMediaAsync("<id>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]></code></example>
</member>
<member name="DownloadMedia(string,RequestContext)">
<example>
This sample shows how to call DownloadMedia and parse the result.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response response = client.DownloadMedia("<id>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call DownloadMedia with all parameters and parse the result.
<code><![CDATA[
NotificationMessagesClient client = new NotificationMessagesClient(null);

Response response = client.DownloadMedia("<id>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]></code></example>
</member>
</members>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading