From d635e4cf97fa57abc29cd324e214c50446afaf32 Mon Sep 17 00:00:00 2001 From: SyedShahbaz Date: Mon, 21 Oct 2024 02:26:02 +0200 Subject: [PATCH 01/11] Feature/add users to group (#367) * Functionality to add users to groups * Functionality to add users to group * AddUsersToGroupAsync accepts IEnumerable emails * Code clean up for AddUsersToGroupAsync method * Add AddUserToGroupAsync extension method to add a single user to a group --- Source/ZoomNet/Extensions/Public.cs | 17 ++++++++++++ Source/ZoomNet/IZoomClient.cs | 5 ++++ Source/ZoomNet/Resources/Groups.cs | 42 +++++++++++++++++++++++++++++ Source/ZoomNet/Resources/IGroups.cs | 20 ++++++++++++++ Source/ZoomNet/ZoomClient.cs | 6 +++++ 5 files changed, 90 insertions(+) create mode 100644 Source/ZoomNet/Resources/Groups.cs create mode 100644 Source/ZoomNet/Resources/IGroups.cs diff --git a/Source/ZoomNet/Extensions/Public.cs b/Source/ZoomNet/Extensions/Public.cs index df34b309..60faab06 100644 --- a/Source/ZoomNet/Extensions/Public.cs +++ b/Source/ZoomNet/Extensions/Public.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using System.Security; using System.Threading; using System.Threading.Tasks; @@ -351,5 +352,21 @@ public static Task GetAsync(this IWebinars webinarResource, long webina { return webinarResource.GetAsync(webinarId, occurrenceId, false, cancellationToken); } + + /// + /// Adds user to a group. + /// + /// The group resource. + /// The ID of the group. + /// An email address of user to add to the group. + /// The cancellation token. + /// A task representing the operation. The result will be a string representing the ID of the added user. + public static async Task AddUserToGroupAsync(this IGroups groupsResource, string groupId, string emailAddress, CancellationToken cancellationToken = default) + { + var result = await groupsResource.AddUsersToGroupAsync(groupId, new[] { emailAddress }, cancellationToken).ConfigureAwait(false); + + // We added a single member to a group therefore the array returned from the Zoom API contains a single element + return result.Single(); + } } } diff --git a/Source/ZoomNet/IZoomClient.cs b/Source/ZoomNet/IZoomClient.cs index 32376525..42cc97d9 100644 --- a/Source/ZoomNet/IZoomClient.cs +++ b/Source/ZoomNet/IZoomClient.cs @@ -127,5 +127,10 @@ public interface IZoomClient /// Gets the resource which allows you to manage SMS messages and sessions. /// ISms Sms { get; } + + /// + /// Gets the resource that allows you to manage groups. + /// + IGroups Groups { get; } } } diff --git a/Source/ZoomNet/Resources/Groups.cs b/Source/ZoomNet/Resources/Groups.cs new file mode 100644 index 00000000..355cc687 --- /dev/null +++ b/Source/ZoomNet/Resources/Groups.cs @@ -0,0 +1,42 @@ +using Pathoschild.Http.Client; +using System.Collections.Generic; +using System.Text.Json.Nodes; +using System.Threading; +using System.Threading.Tasks; + +namespace ZoomNet.Resources; + +/// +public class Groups : IGroups +{ + private readonly IClient _client; + + internal Groups(IClient client) + { + _client = client; + } + + /// + public async Task AddUsersToGroupAsync(string groupId, IEnumerable emails, CancellationToken cancellationToken = default) + { + var membersArray = new JsonArray(); + foreach (var email in emails) + { + membersArray.Add(new JsonObject { { "email", email } }); + } + + var data = new JsonObject + { + { "members", membersArray }, + }; + + var response = await _client + .PostAsync($"groups/{groupId}/members") + .WithJsonBody(data) + .WithCancellationToken(cancellationToken) + .AsJson() + .ConfigureAwait(false); + + return response.GetPropertyValue("ids", string.Empty).Split(','); + } +} diff --git a/Source/ZoomNet/Resources/IGroups.cs b/Source/ZoomNet/Resources/IGroups.cs new file mode 100644 index 00000000..5734b6aa --- /dev/null +++ b/Source/ZoomNet/Resources/IGroups.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace ZoomNet.Resources; + +/// +/// Allows you to manage Groups. +/// +public interface IGroups +{ + /// + /// Adds users to a group. + /// + /// The ID of the group. + /// An enumeration of email addresses of users to add to the group. + /// The cancellation token. + /// A task representing the operation. The result will be an array of strings representing the IDs of the added users. + public Task AddUsersToGroupAsync(string groupId, IEnumerable emails, CancellationToken cancellationToken = default); +} diff --git a/Source/ZoomNet/ZoomClient.cs b/Source/ZoomNet/ZoomClient.cs index e644e9e2..038ecb25 100644 --- a/Source/ZoomNet/ZoomClient.cs +++ b/Source/ZoomNet/ZoomClient.cs @@ -180,6 +180,11 @@ public static string Version /// public ISms Sms { get; private set; } + /// + /// Gets the resource that allows you to manage groups. + /// + public IGroups Groups { get; private set; } + #endregion #region CTOR @@ -287,6 +292,7 @@ private ZoomClient(IConnectionInfo connectionInfo, HttpClient httpClient, bool d Chatbot = new Chatbot(_fluentClient); Phone = new Phone(_fluentClient); Sms = new Sms(_fluentClient); + Groups = new Groups(_fluentClient); } /// From 916ecdb0d1432dc872a70e25c873ae789c09ffcf Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 20 Oct 2024 20:43:41 -0400 Subject: [PATCH 02/11] Use arrays instead of enumerations to avoid serialization problems Resolves #368 --- Source/ZoomNet/Resources/Chat.cs | 2 +- Source/ZoomNet/Resources/Groups.cs | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/ZoomNet/Resources/Chat.cs b/Source/ZoomNet/Resources/Chat.cs index b148ad9b..b7eec5f6 100644 --- a/Source/ZoomNet/Resources/Chat.cs +++ b/Source/ZoomNet/Resources/Chat.cs @@ -60,7 +60,7 @@ public Task CreateAccountChannelAsync(string userId, string name, C { { "name", name }, { "type", type }, - { "members", emails?.Select(e => new JsonObject { { "email", e } }) } + { "members", emails?.Select(e => new JsonObject { { "email", e } }).ToArray() } }; return _client diff --git a/Source/ZoomNet/Resources/Groups.cs b/Source/ZoomNet/Resources/Groups.cs index 355cc687..18ca8737 100644 --- a/Source/ZoomNet/Resources/Groups.cs +++ b/Source/ZoomNet/Resources/Groups.cs @@ -1,5 +1,6 @@ using Pathoschild.Http.Client; using System.Collections.Generic; +using System.Linq; using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; @@ -19,15 +20,9 @@ internal Groups(IClient client) /// public async Task AddUsersToGroupAsync(string groupId, IEnumerable emails, CancellationToken cancellationToken = default) { - var membersArray = new JsonArray(); - foreach (var email in emails) - { - membersArray.Add(new JsonObject { { "email", email } }); - } - var data = new JsonObject { - { "members", membersArray }, + { "members", emails?.Select(e => new JsonObject { { "email", e } }).ToArray() } }; var response = await _client From b5a84fd2f03fcf2c45976fe7374c53896ccbf13f Mon Sep 17 00:00:00 2001 From: Jericho Date: Thu, 24 Oct 2024 11:11:51 -0400 Subject: [PATCH 03/11] Improve ParticipantDeviceConverter to handle strings like "Web Browser Chrome 129" Resolves #370 --- Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs | 1 + Source/ZoomNet/Json/ParticipantDeviceConverter.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs b/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs index 2e3149f2..6962f7ac 100644 --- a/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs +++ b/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs @@ -76,6 +76,7 @@ public void Write_multiple() [InlineData("win 11", ParticipantDevice.Windows)] [InlineData("Zoom Rooms", ParticipantDevice.ZoomRoom)] [InlineData("win 10+ 17763", ParticipantDevice.Windows)] + [InlineData("Web Browser Chrome 129", ParticipantDevice.Web)] public void Read_single(string value, ParticipantDevice expectedValue) { // Arrange diff --git a/Source/ZoomNet/Json/ParticipantDeviceConverter.cs b/Source/ZoomNet/Json/ParticipantDeviceConverter.cs index a3ddd9fe..deb92a7e 100644 --- a/Source/ZoomNet/Json/ParticipantDeviceConverter.cs +++ b/Source/ZoomNet/Json/ParticipantDeviceConverter.cs @@ -42,6 +42,11 @@ public override void Write(Utf8JsonWriter writer, ParticipantDevice[] value, Jso private static ParticipantDevice Convert(string deviceAsString) { if (string.IsNullOrWhiteSpace(deviceAsString)) return ParticipantDevice.Unknown; + + // See https://github.com/Jericho/ZoomNet/issues/369 for details about the underlying problem + // See https://github.com/Jericho/ZoomNet/issues/370 for details about this workaround + if (deviceAsString.StartsWith("Web Browser", StringComparison.OrdinalIgnoreCase)) return ParticipantDevice.Web; + return deviceAsString.Trim().ToEnum(); } } From 1dfbe9d66b50f3d3b414673ba3e32269def5d427 Mon Sep 17 00:00:00 2001 From: Jericho Date: Thu, 24 Oct 2024 11:18:12 -0400 Subject: [PATCH 04/11] Upgrade to Cake 4.2.0 --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index da200cda..1f95b27b 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "4.0.0", + "version": "4.2.0", "commands": [ "dotnet-cake" ] From 9ebcc67cedf38cd7206bd9743538e999c7b7f219 Mon Sep 17 00:00:00 2001 From: Jericho Date: Thu, 24 Oct 2024 11:18:23 -0400 Subject: [PATCH 05/11] Refresh build script --- build.cake | 6 +++--- global.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.cake b/build.cake index d3c1785b..71596964 100644 --- a/build.cake +++ b/build.cake @@ -1,9 +1,9 @@ // Install tools. -#tool dotnet:?package=GitVersion.Tool&version=6.0.2 +#tool dotnet:?package=GitVersion.Tool&version=6.0.3 #tool dotnet:?package=coveralls.net&version=4.0.1 #tool nuget:https://f.feedz.io/jericho/jericho/nuget/?package=GitReleaseManager&version=0.17.0-collaborators0008 -#tool nuget:?package=ReportGenerator&version=5.3.9 -#tool nuget:?package=xunit.runner.console&version=2.9.1 +#tool nuget:?package=ReportGenerator&version=5.3.11 +#tool nuget:?package=xunit.runner.console&version=2.9.2 #tool nuget:?package=CodecovUploader&version=0.8.0 // Install addins. diff --git a/global.json b/global.json index caa3335a..a323b039 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.402", + "version": "8.0.403", "rollForward": "patch", "allowPrerelease": false } From 0915e6c289960ec6c65828f795f3ac8f55d9d481 Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 11:19:21 -0400 Subject: [PATCH 06/11] (GH-371) Fix slow parsing of large response --- .../Extensions/InternalTests.cs | 21 ++++++++ Source/ZoomNet/Extensions/Internal.cs | 54 +++++++++++-------- 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/Source/ZoomNet.UnitTests/Extensions/InternalTests.cs b/Source/ZoomNet.UnitTests/Extensions/InternalTests.cs index 3cbeba08..1f923b14 100644 --- a/Source/ZoomNet.UnitTests/Extensions/InternalTests.cs +++ b/Source/ZoomNet.UnitTests/Extensions/InternalTests.cs @@ -374,5 +374,26 @@ public void ToEnumString(MyEnum value, string expected) } } + + + public class GetErrorMessageAsync + { + [Fact] + public async Task CanHandleUnescapedDoubleQuotesInErrorMessage() + { + // Arrange + const string responseContent = @"{""code"":104, ""message"":""Invalid access token, does not contain scopes:[""zoom_events_basic:read"",""zoom_events_basic:read:admin""]""}"; + var message = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(responseContent) }; + var response = new MockFluentHttpResponse(message, null, CancellationToken.None); + + // Act + var (isError, errorMessage, errorCode) = await response.Message.GetErrorMessageAsync(); + + // Assert + isError.ShouldBeTrue(); + errorMessage.ShouldStartWith("Invalid access token, does not contain scopes"); + errorCode.ShouldBe(104); + } + } } } diff --git a/Source/ZoomNet/Extensions/Internal.cs b/Source/ZoomNet/Extensions/Internal.cs index 7a3c152f..07848aa5 100644 --- a/Source/ZoomNet/Extensions/Internal.cs +++ b/Source/ZoomNet/Extensions/Internal.cs @@ -945,29 +945,39 @@ internal static bool IsNullableType(this Type type) private static async Task ParseZoomResponseAsync(this HttpContent responseFromZoomApi, CancellationToken cancellationToken = default) { var responseContent = await responseFromZoomApi.ReadAsStringAsync(null, cancellationToken).ConfigureAwait(false); - if (string.IsNullOrEmpty(responseContent)) return default; // the 'ValueKind' property of the default JsonElement is JsonValueKind.Undefined + if (string.IsNullOrEmpty(responseContent)) return default; // FYI: the 'ValueKind' property of the default JsonElement is JsonValueKind.Undefined - const string pattern = @"(.*?)(?<=""message"":"")(.*?)(?=""})(.*?$)"; - var matches = Regex.Match(responseContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.Compiled); - var prefix = matches.Groups[1].Value; - var message = matches.Groups[2].Value; - var postfix = matches.Groups[3].Value; - - if (string.IsNullOrEmpty(message)) return JsonDocument.Parse(responseContent).RootElement; - - /* - Sometimes the error message is malformed due to the presence of double quotes that are not properly escaped. - See: https://devforum.zoom.us/t/list-events-endpoint-returns-invalid-json-in-the-payload/115792 for more info. - One instance where this problem was observed is when retrieving the list of events without having the necessary permissions to do so. - The result is the following response with unescaped double-quotes in the error message: - { - "code": 104, - "message": "Invalid access token, does not contain scopes:["zoom_events_basic:read","zoom_events_basic:read:admin"]" - } - */ - var escapedMessage = Regex.Replace(message, @"(?Asynchronously converts the JSON encoded content and convert it to an object of the desired type. From 1045e46dc2c94adcd1ccec459f8df2810b1fe0a6 Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 12:30:04 -0400 Subject: [PATCH 07/11] (doc) Remove duplicate XML comments --- Source/ZoomNet/Resources/Accounts.cs | 126 +++------------------------ Source/ZoomNet/Resources/Groups.cs | 4 + 2 files changed, 16 insertions(+), 114 deletions(-) diff --git a/Source/ZoomNet/Resources/Accounts.cs b/Source/ZoomNet/Resources/Accounts.cs index 90ba601b..1f8bb601 100644 --- a/Source/ZoomNet/Resources/Accounts.cs +++ b/Source/ZoomNet/Resources/Accounts.cs @@ -9,13 +9,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage sub accounts under the master account. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Accounts : IAccounts { private readonly Pathoschild.Http.Client.IClient _client; @@ -29,15 +23,7 @@ internal Accounts(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Retrieve all the sub accounts under the master account. - /// - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetAllAsync(int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { @@ -54,15 +40,7 @@ public Task> GetAllAsync(int recordsPerPage = 30, int .AsPaginatedResponse("accounts"); } - /// - /// Retrieve all the sub accounts under the master account. - /// - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetAllAsync(int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -78,22 +56,7 @@ public Task> GetAllAsync(int recordsPerPage .AsPaginatedResponseWithToken("accounts"); } - /// - /// Create a sub account under the master account. - /// - /// User's first name. - /// User's last name. - /// User's email address. - /// User's password. - /// Enable/disable the option for a sub account to use shared Virtual Room Connector(s). - /// The IP addresses of the Room Connectors that you would like to share with the sub account. - /// Enable/disable the option for a sub account to use shared Meeting Connector(s). - /// The IP addresses of the Meeting Connectors that you would like to share with the sub account. - /// Payee. - /// The cancellation token. - /// - /// The . - /// + /// public Task CreateAsync(string firstName, string lastName, string email, string password, bool useSharedVirtualRoomConnectors = false, IEnumerable roomConnectorsIpAddresses = null, bool useSharedMeetingConnectors = false, IEnumerable meetingConnectorsIpAddresses = null, PayMode payMode = PayMode.Master, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -122,14 +85,7 @@ public Task CreateAsync(string firstName, string lastName, string email .AsObject(); } - /// - /// Retrieve the details of a sub account. - /// - /// The account Id. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetAsync(long accountId, CancellationToken cancellationToken = default) { // The information returned from this API call is vastly different than what is returned by GetAllAsync @@ -139,17 +95,7 @@ public Task GetAsync(long accountId, CancellationToken cancellationToke .AsObject(); } - /// - /// Disassociate a Sub Account from the Master Account. - /// - /// The account Id that must be disassociated from its master account. - /// The cancellation token. - /// - /// The async task. - /// - /// - /// This will leave the Sub Account intact but it will no longer be associated with the master account. - /// + /// public Task DisassociateAsync(long accountId, CancellationToken cancellationToken = default) { return _client @@ -158,19 +104,7 @@ public Task DisassociateAsync(long accountId, CancellationToken cancellationToke .AsMessage(); } - /// - /// Update a Sub Account's options under the Master Account. - /// - /// The account Id. - /// Enable/disable the option for a sub account to use shared Virtual Room Connector(s). - /// The IP addresses of the Room Connectors that you would like to share with the sub account. - /// Enable/disable the option for a sub account to use shared Meeting Connector(s). - /// The IP addresses of the Meeting Connectors that you would like to share with the sub account. - /// Payee. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateOptionsAsync(long accountId, bool? useSharedVirtualRoomConnectors = null, IEnumerable roomConnectorsIpAddresses = null, bool? useSharedMeetingConnectors = null, IEnumerable meetingConnectorsIpAddresses = null, PayMode? payMode = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -189,14 +123,7 @@ public Task UpdateOptionsAsync(long accountId, bool? useSharedVirtualRoomConnect .AsMessage(); } - /// - /// Retrieve an account's meeting authentication settings. - /// - /// The account Id. - /// The cancellation token. - /// - /// The settings. - /// + /// public async Task GetMeetingAuthenticationSettingsAsync(long accountId, CancellationToken cancellationToken = default) { var response = await _client @@ -215,14 +142,7 @@ public async Task GetMeetingAuthenticationSettingsAsync( return settings; } - /// - /// Retrieve an account's recording authentication settings. - /// - /// The account Id. - /// The cancellation token. - /// - /// The settings. - /// + /// public async Task GetRecordingAuthenticationSettingsAsync(long accountId, CancellationToken cancellationToken = default) { var response = await _client @@ -241,14 +161,7 @@ public async Task GetRecordingAuthenticationSettingsAsyn return settings; } - /// - /// Retrieve a sub account's managed domains. - /// - /// The account Id. - /// The cancellation token. - /// - /// An array of managed domains and their status. - /// + /// public async Task<(string Domain, string Status)[]> GetManagedDomainsAsync(long accountId, CancellationToken cancellationToken = default) { var response = await _client @@ -269,14 +182,7 @@ public async Task GetRecordingAuthenticationSettingsAsyn return managedDomains; } - /// - /// Retrieve a sub account's trusted domains. - /// - /// The account Id. - /// The cancellation token. - /// - /// An array of trusted domains. - /// + /// public Task GetTrustedDomainsAsync(long accountId, CancellationToken cancellationToken = default) { return _client @@ -285,15 +191,7 @@ public Task GetTrustedDomainsAsync(long accountId, CancellationToken c .AsObject("trusted_domains"); } - /// - /// Change the owner of a Sub Account to another user on the same account. - /// - /// The account Id. - /// The new owner's email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateOwnerAsync(long accountId, string newOwnerEmail, CancellationToken cancellationToken = default) { var data = new JsonObject diff --git a/Source/ZoomNet/Resources/Groups.cs b/Source/ZoomNet/Resources/Groups.cs index 18ca8737..b3fa97a1 100644 --- a/Source/ZoomNet/Resources/Groups.cs +++ b/Source/ZoomNet/Resources/Groups.cs @@ -12,6 +12,10 @@ public class Groups : IGroups { private readonly IClient _client; + /// + /// Initializes a new instance of the class. + /// + /// The HTTP client. internal Groups(IClient client) { _client = client; From 3e02e3ff2b58fc7bef6542248b510b7ff26baa3a Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 12:30:58 -0400 Subject: [PATCH 08/11] (doc) Remove duplicate XML comments --- Source/ZoomNet/Resources/CallLogs.cs | 40 +++------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/Source/ZoomNet/Resources/CallLogs.cs b/Source/ZoomNet/Resources/CallLogs.cs index e9857153..b851c47d 100644 --- a/Source/ZoomNet/Resources/CallLogs.cs +++ b/Source/ZoomNet/Resources/CallLogs.cs @@ -6,13 +6,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage call logs. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class CallLogs : ICallLogs { private readonly Pathoschild.Http.Client.IClient _client; @@ -26,20 +20,7 @@ internal CallLogs(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Get call logs for specified user. - /// - /// The user Id or email address. - /// The start date. - /// The end date. - /// Type of call log. - /// Phone number for filtering call log. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetAsync(string userId, DateTime? from = null, DateTime? to = null, CallLogType type = CallLogType.All, string phoneNumber = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -59,22 +40,7 @@ public Task> GetAsync(string userId, Dat .AsPaginatedResponseWithToken("call_logs"); } - /// - /// Get call logs for an entire account. - /// - /// The start date. - /// The end date. - /// Type of call log. - /// Filter the API response by path of the call. - /// Enables you to search call logs by start or end time. - /// Unique identifier of the site. Use this query parameter if you have enabled multiple sites and would like to filter the response of this API call by call logs of a specific phone site. - /// Whether to filter API responses to include call logs that only have a non-zero charge. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetAsync(DateTime? from = null, DateTime? to = null, CallLogType type = CallLogType.All, CallLogPathType? pathType = null, CallLogTimeType? timeType = CallLogTimeType.StartTime, string siteId = null, bool chargedCallLogs = false, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) From 846e2edd0e91446a84db552c338e65920a91de01 Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 12:40:45 -0400 Subject: [PATCH 09/11] (doc) Remove duplicate XML comments --- Source/ZoomNet/Resources/Chatbot.cs | 73 +--- Source/ZoomNet/Resources/CloudRecordings.cs | 103 +---- Source/ZoomNet/Resources/Dashboards.cs | 328 ++-------------- Source/ZoomNet/Resources/DataCompliance.cs | 22 +- Source/ZoomNet/Resources/Meetings.cs | 382 ++---------------- Source/ZoomNet/Resources/PastMeetings.cs | 38 +- Source/ZoomNet/Resources/PastWebinars.cs | 68 +--- Source/ZoomNet/Resources/Reports.cs | 7 +- Source/ZoomNet/Resources/Roles.cs | 90 +---- Source/ZoomNet/Resources/Users.cs | 284 ++------------ Source/ZoomNet/Resources/Webinars.cs | 407 ++------------------ 11 files changed, 152 insertions(+), 1650 deletions(-) diff --git a/Source/ZoomNet/Resources/Chatbot.cs b/Source/ZoomNet/Resources/Chatbot.cs index c1719afe..d54b6413 100644 --- a/Source/ZoomNet/Resources/Chatbot.cs +++ b/Source/ZoomNet/Resources/Chatbot.cs @@ -7,12 +7,7 @@ namespace ZoomNet.Resources; -/// -/// Allows you to manage Chatbot messages. -/// -/// -/// See Zoom documentation for more information. -/// +/// public class Chatbot : IChatbot { private readonly IClient _client; @@ -26,17 +21,7 @@ internal Chatbot(IClient client) _client = client; } - /// - /// Delete a Chatbot message. - /// - /// The message ID. - /// The account ID to which the message was sent. - /// The JID of the user on whose behalf the message is being sent. Optional. - /// The robot JID. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteMessageAsync(string messageId, string accountId, string userJId, string robotJId, CancellationToken cancellationToken = default) { return _client @@ -48,35 +33,13 @@ public Task DeleteMessageAsync(string messageId, stri .AsObject(); } - /// - /// Send Chatbot message. - /// - /// The account ID to which the message was sent. - /// The JID of group channel or user to whom the message should be sent. - /// The robot JID. - /// The simple text message to send. - /// True if the message contains markdown syntax. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task SendMessageAsync(string accountId, string toJId, string robotJId, string message, bool enableMarkdownSupport = false, CancellationToken cancellationToken = default) { return SendMessageAsync(accountId, toJId, robotJId, new ChatbotContent() { Head = new ChatbotHeader(message) }, enableMarkdownSupport, cancellationToken); } - /// - /// Send Chatbot message. - /// - /// The account ID to which the message was sent. - /// The JID of group channel or user to whom the message should be sent. - /// The robot JID. - /// The content of the message. - /// True if the content contains markdown syntax. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task SendMessageAsync(string accountId, string toJId, string robotJId, ChatbotContent content, bool enableMarkdownSupport = false, CancellationToken cancellationToken = default) { content.Validate(enableMarkdownSupport); @@ -97,37 +60,13 @@ public Task SendMessageAsync(string accountId, string .AsObject(); } - /// - /// Edit a Chatbot message. - /// - /// The message ID of the message to edit. - /// The account ID to which the message was sent. - /// The JID of group channel or user to whom the message should be sent. - /// The robot JID. - /// The simple text message to send. - /// True if the message contains markdown syntax. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task EditMessageAsync(string messageId, string accountId, string toJId, string robotJId, string message, bool enableMarkdownSupport = false, CancellationToken cancellationToken = default) { return EditMessageAsync(messageId, accountId, toJId, robotJId, new ChatbotContent() { Head = new ChatbotHeader(message) }, enableMarkdownSupport, cancellationToken); } - /// - /// Edit a Chatbot message. - /// - /// The message ID of the message to edit. - /// The account ID to which the message was sent. - /// The JID of group channel or user to whom the message should be sent. - /// The robot JID. - /// The content of the message. - /// True if the content contains markdown syntax. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task EditMessageAsync(string messageId, string accountId, string toJId, string robotJId, ChatbotContent content, bool enableMarkdownSupport = false, CancellationToken cancellationToken = default) { content.Validate(enableMarkdownSupport); diff --git a/Source/ZoomNet/Resources/CloudRecordings.cs b/Source/ZoomNet/Resources/CloudRecordings.cs index 3c0696f5..155018d5 100644 --- a/Source/ZoomNet/Resources/CloudRecordings.cs +++ b/Source/ZoomNet/Resources/CloudRecordings.cs @@ -13,12 +13,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage cloud recordings. - /// - /// - /// See Zoom documentation for more information. - /// + /// public class CloudRecordings : ICloudRecordings { private readonly Pathoschild.Http.Client.IClient _client; @@ -112,15 +107,7 @@ public Task RecoverRecordingFilesAsync(string meetingId, CancellationToken cance .AsMessage(); } - /// - /// Recover a specific recording file of a meeting. - /// - /// The meeting Id or UUID. - /// The recording file id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RecoverRecordingFileAsync(string meetingId, string recordingFileId, CancellationToken cancellationToken = default) { return _client @@ -130,14 +117,7 @@ public Task RecoverRecordingFileAsync(string meetingId, string recordingFileId, .AsMessage(); } - /// - /// Retrieve settings applied to a meeting's cloud recording. - /// - /// The meeting Id or UUID. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetRecordingSettingsAsync(string meetingId, CancellationToken cancellationToken = default) { return _client @@ -146,16 +126,7 @@ public Task GetRecordingSettingsAsync(string meetingId, Cance .AsObject(); } - /// - /// Retrieve all registrants for a recording. - /// - /// The meeting Id or UUID. - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of registrants. - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetRecordingRegistrantsAsync(string meetingId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { @@ -172,16 +143,7 @@ public Task> GetRecordingRegistrantsAsync(string m .AsPaginatedResponse("registrants"); } - /// - /// Retrieve all registrants for a recording. - /// - /// The meeting Id or UUID. - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of registrants. - /// + /// public Task> GetRecordingRegistrantsAsync(string meetingId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -197,30 +159,7 @@ public Task> GetRecordingRegistrantsAsync .AsPaginatedResponseWithToken("registrants"); } - /// - /// Add a registrant to an on-demand recording. - /// - /// The meeting ID. - /// Registrant's email address. - /// Registrant's first name. - /// Registrant's last name. - /// Registrant's address. - /// Registrant's city. - /// Registrant's country. - /// Registrant's zip/postal code. - /// Registrant's state/province. - /// Registrant's phone number. - /// Registrant's industry. - /// Registrant's organization. - /// Registrant's job title. - /// This field can be included to gauge interest of attendees towards buying your product or service. - /// Registrant's role in purchase decision. - /// Number of employees. - /// A field that allows registrants to provide any questions or comments that they might have. - /// The cancellation token. - /// - /// A . - /// + /// public Task AddRegistrantAsync(long meetingId, string email, string firstName, string lastName, string address, string city, string country, string zip, string state, string phone, string industry, string organization, string jobTitle, string purchasingTimeFrame, string roleInPurchaseProcess, string numberOfEmployees, string comments, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -250,29 +189,13 @@ public Task AddRegistrantAsync(long meetingId, string ema .AsObject(); } - /// - /// Approve a registration for a meeting. - /// - /// The meeting ID. - /// The registrant ID. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantAsync(long meetingId, string registrantId, CancellationToken cancellationToken = default) { return ApproveRegistrantsAsync(meetingId, new[] { registrantId }, cancellationToken); } - /// - /// Approve multiple registrations for a meeting. - /// - /// The meeting ID. - /// ID for each registrant to be approved. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantsAsync(long meetingId, IEnumerable registrantIds, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(meetingId, registrantIds, "approve", cancellationToken); @@ -292,15 +215,7 @@ public Task RejectRegistrantAsync(long meetingId, string registrantId, Cancellat return RejectRegistrantsAsync(meetingId, new[] { registrantId }, cancellationToken); } - /// - /// Reject multiple registrations for a meeting. - /// - /// The meeting ID. - /// ID for each registrant to be rejected. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RejectRegistrantsAsync(long meetingId, IEnumerable registrantIds, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(meetingId, registrantIds, "deny", cancellationToken); diff --git a/Source/ZoomNet/Resources/Dashboards.cs b/Source/ZoomNet/Resources/Dashboards.cs index f170a06d..f4b6f5ae 100644 --- a/Source/ZoomNet/Resources/Dashboards.cs +++ b/Source/ZoomNet/Resources/Dashboards.cs @@ -6,12 +6,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to view various metrics. - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Dashboards : IDashboards { private readonly IClient _client; @@ -25,25 +20,7 @@ internal Dashboards(IClient client) _client = client; } - /// - /// Retrieve data on total live or past meetings that occurred during a specified period of time. - /// Only data from within the last 6 months will be returned. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of meetings. - /// + /// public Task> GetAllMeetingsAsync(DateTime from, DateTime to, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -62,15 +39,7 @@ public Task> Get .AsPaginatedResponseWithTokenAndDateRange("meetings"); } - /// - /// Retrieve the details of a meeting. - /// - /// The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetMeetingAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default) { return _client @@ -80,24 +49,7 @@ public Task GetMeetingAsync(string meetingId, Dashboard .AsObject(); } - /// - /// Get a list of participants from live or past meetings. - /// If you do not provide the type query parameter, the default value will be set to live and thus, - /// you will only see metrics for participants in a live meeting, if any meeting is currently being conducted.To view metrics on past meeting participants, - /// provide the appropriate value for type. - /// - /// The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of participants. - /// + /// public Task> GetMeetingParticipantsAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -115,16 +67,7 @@ public Task> GetMeetingP .AsPaginatedResponseWithToken("participants"); } - /// - /// Retrieve the quality of service for participants from live or past meetings. - /// This data indicates the connection quality for sending/receiving video, audio, and shared content. - /// If nothing is being sent or received at that time, no information will be shown in the fields. - /// - /// The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance. - /// The participant id. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The cancellation token. - /// The quality of service metrics for the participant. + /// public Task GetMeetingParticipantQosAsync(string meetingId, string participantId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default) { return _client @@ -134,21 +77,7 @@ public Task GetMeetingParticipantQosAsync(string .AsObject(); } - /// - /// Get a list of meeting participants from live or past meetings along with the quality of service they receive during the meeting such as connection quality for sending/receiving video, audio, and shared content. - /// - /// The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of quality of service metrics for participants of the meeting.. - /// + /// public Task> GetAllMeetingParticipantsQosAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 1, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 10) @@ -165,21 +94,7 @@ public Task> GetAllMe .AsPaginatedResponseWithToken("participants"); } - /// - /// Retrieve the sharing and recording details of participants from live or past meetings. - /// - /// The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// The sharing details for the meetings participants.. - /// + /// public Task> GetAllMeetingParticipantSharingDetailsAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -196,25 +111,7 @@ public Task> GetAllMeeting .AsPaginatedResponseWithToken("participants"); } - /// - /// Retrieve data on total live or past webinars that occurred during a specified period of time. - /// Only data from within the last 6 months will be returned. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The type of meetings. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of webinars.. - /// + /// public Task> GetAllWebinarsAsync(DateTime from, DateTime to, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -233,15 +130,7 @@ public Task> GetAll .AsPaginatedResponseWithTokenAndDateRange("webinars"); } - /// - /// Retrieve the details of a webinar. - /// - /// The webinar ID or meeting UUID. If given the webinar ID it will take the last webinar instance. - /// The type of webinar. Allowed values: Past, PastOne, Live. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetWebinarAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default) { return _client @@ -251,21 +140,7 @@ public Task GetWebinarAsync(string webinarId, DashboardMee .AsObject(); } - /// - /// Get a list of participants from live or past webinars. - /// - /// The webinar ID or webinar UUID. If given the webinar ID it will take the last webinar instance. - /// The type of webinar. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of participants. - /// + /// public Task> GetWebinarParticipantsAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -282,16 +157,7 @@ public Task> GetWebinarParticip .AsPaginatedResponseWithToken("participants"); } - /// - /// Retrieve the quality of service for participants from live or past webinars. - /// This data indicates the connection quality for sending/receiving video, audio, and shared content. - /// If nothing is being sent or received at that time, no information will be shown in the fields. - /// - /// The webinar ID or webinar UUID. If given the webinar ID it will take the last webinar instance. - /// The participant id. - /// The type of webinars. Allowed values: Past, PastOne, Live. - /// The cancellation token. - /// The quality of service metrics for the participant. + /// public Task GetWebinarParticipantQosAsync(string webinarId, string participantId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default) { return _client @@ -301,21 +167,7 @@ public Task GetWebinarParticipantQosAsync(string .AsObject(); } - /// - /// Get a list of webinar participants from live or past webinars along with the quality of service they receive during the webinar such as connection quality for sending/receiving video, audio, and shared content. - /// - /// The webinar ID or webinar UUID. If given the webinar ID it will take the last webinar instance. - /// The type of webinars. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of quality of service metrics for participants of the webinar.. - /// + /// public Task> GetAllWebinarParticipantQosAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 1, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 10) @@ -332,21 +184,7 @@ public Task> GetAllWe .AsPaginatedResponseWithToken("participants"); } - /// - /// Retrieve the sharing and recording details of participants from live or past webinars. - /// - /// The webinar ID or webinar UUID. If given the webinar ID it will take the last webinar instance. - /// The type of webinars. Allowed values: Past, PastOne, Live. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// The sharing details for the webinars participants.. - /// + /// public Task> GetAllWebinarParticipantSharingDetailsAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -363,17 +201,7 @@ public Task> GetAllWebinar .AsPaginatedResponseWithToken("participants"); } - /// - /// List information on all Zoom Rooms in an account. - /// - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// An array of Zoom rooms. + /// public Task> GetAllZoomRoomsAsync(int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -389,22 +217,7 @@ public Task> GetAllZoomRoomsAsync(int pageS .AsPaginatedResponseWithToken("zoom_rooms"); } - /// - /// The Zoom Rooms dashboard metrics lets you know the type of configuration a Zoom room has and details on the meetings held in that room. - /// - /// The Zoom room id. - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// A Zoom room with details on current and past meetings. + /// public Task GetRoomDetailsAsync(string zoomRoomId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -422,17 +235,7 @@ public Task GetRoomDetailsAsync(string zoomRoomId, DateTime from, Date .AsObject(); } - /// - /// A Cloud Room Connector allows H.323/SIP endpoints to connect to a Zoom meeting.
- /// Use this API to get the hour by hour CRC Port usage for a specified period of time.
- /// We will provide the report for a maximum of one month.For example, if “from” is set to “2017-08-05” and “to” is set to “2017-10-10”, we will adjust “from” to “2017-09-10”. - ///
- /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The cancellation token. - /// The Report of metrics on CRC usage. + /// public Task GetCrcPortUsageAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default) { return _client @@ -443,23 +246,7 @@ public Task GetCrcPortUsageAsync(DateTime from, DateTime to, Can .AsObject(); } - /// - /// Get metrics on how users are utilizing the Zoom Chat Client. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of chat room usage metrics. - /// + /// public Task> GetImMetricsAsync(DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -477,15 +264,7 @@ public Task> GetImMetricsAsync( .AsPaginatedResponseWithTokenAndDateRange("users"); } - /// - /// Retrieve survey results from Zoom meetings client feedback.. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The cancellation token. - /// A report with metrics on client feedback. + /// public Task GetClientFeedbackMetricsAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default) { return _client @@ -496,15 +275,7 @@ public Task GetClientFeedbackMetricsAsync(DateTime .AsObject(); } - /// - /// Get Top 25 issues of Zoom rooms. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The cancellation token. - /// A report with the list of top issues in Zoom rooms. + /// public Task GetIssuesOfZoomRoomsAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default) { return _client @@ -515,15 +286,7 @@ public Task GetIssuesOfZoomRoomsAsync(DateTime from, Da .AsObject(); } - /// - /// Get Top 25 issues of Zoom rooms. - /// - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The cancellation token. - /// A report with the list of top issues in Zoom rooms. + /// public Task GetZoomRoomsWithIssuesAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default) { return _client @@ -534,24 +297,7 @@ public Task GetZoomRoomsWithIssuesAsync(DateTime from, .AsObject(); } - /// - /// Get information about the issues that occurred on the Top 25 Zoom Rooms with issues in an account. - /// - /// The Zoom room id. - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of Zoom room issue details. - /// + /// public Task> GetIssuesOfZoomRoomAsync(string zoomRoomId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -569,24 +315,7 @@ public Task> GetIss .AsPaginatedResponseWithTokenAndDateRange("issue_details"); } - /// - /// Retrieve detailed information on a Zoom meetings client feedback.. - /// - /// The Zoom room id. - /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The number of records returned within a single API call. - /// - /// The next page token is used to paginate through large result sets. - /// A next page token will be returned whenever the set of available results exceeds the current page size. - /// The expiration period for this token is 15 minutes. - /// - /// The cancellation token. - /// - /// An array of client feedback details. - /// + /// public Task> GetZoomMeetingsClientFeedbackAsync(string feedbackId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default) { if (pageSize < 1 || pageSize > 300) @@ -604,18 +333,7 @@ public Task> GetZoo .AsPaginatedResponseWithTokenAndDateRange("client_feedback_details"); } - /// - /// If the End of Meeting Feedback Survey option is enabled, attendees will be prompted with a survey window where they can tap either the Thumbs Up or Thumbs Down button that indicates their Zoom meeting experience.
- /// With this API, you can get information on the attendees' meeting satisfaction. Specify a monthly date range for the query using the from and to query parameters. - /// The month should fall within the last six months.
- /// To get information on the survey results with negative experiences(indicated by Thumbs Down), use . - ///
- /// - /// Date to start searching from. Should be within a month of "to" as only a months worth of data is returned at a time. - /// - /// Date to end search. - /// The cancellation token. - /// A report with a list of client satisfaction reports. + /// public Task GetClientMeetingSatisfactionMetrics(DateTime from, DateTime to, CancellationToken cancellationToken = default) { return _client diff --git a/Source/ZoomNet/Resources/DataCompliance.cs b/Source/ZoomNet/Resources/DataCompliance.cs index 31a84682..1fa2d19c 100644 --- a/Source/ZoomNet/Resources/DataCompliance.cs +++ b/Source/ZoomNet/Resources/DataCompliance.cs @@ -9,15 +9,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to notify Zoom that you comply with the policy which requires you to handle - /// user's data in accordance to the user's preference after the user uninstalls your app. - /// - /// - /// - /// This resource can only be used when you connect to Zoom using OAuth. It cannot be used with a Jwt connection. - /// See Zoom documentation for more information. - /// + /// [Obsolete("The Data Compliance API is deprecated")] public class DataCompliance : IDataCompliance { @@ -32,17 +24,7 @@ internal DataCompliance(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Notify Zoom that you comply with the policy which requires you to handle user's - /// data in accordance to the user's preference after the user uninstalls your app. - /// - /// The Zoom user's id who uninstalled your app. - /// The account Id. - /// This object represents the payload of the webhook event sent by Zoom in your Deauthorization Endpoint Url after a user uninstalls your app. The values of the parameters in this object should be the same as that of the deauthorization event that you receive. - /// The cancellation token. - /// - /// The async task. - /// + /// [Obsolete("The Data Compliance API is deprecated")] public Task NotifyAsync(string userId, long accountId, AppDeauthorizedEvent deauthorizationEventReceived, CancellationToken cancellationToken = default) { diff --git a/Source/ZoomNet/Resources/Meetings.cs b/Source/ZoomNet/Resources/Meetings.cs index 118fbb29..cc066aa2 100644 --- a/Source/ZoomNet/Resources/Meetings.cs +++ b/Source/ZoomNet/Resources/Meetings.cs @@ -9,13 +9,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage meetings. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Meetings : IMeetings { private readonly Pathoschild.Http.Client.IClient _client; @@ -64,21 +58,7 @@ public Task> GetAllAsync(string userI .AsPaginatedResponseWithToken("meetings"); } - /// - /// Creates an instant meeting for a user. - /// - /// The user Id or email address. - /// Meeting topic. - /// Meeting description. - /// Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. - /// Meeting settings. - /// Tracking fields. - /// Template Identifer. - /// The cancellation token. - /// - /// The new . - /// - /// Thrown when an exception occured while creating the meeting. + /// public Task CreateInstantMeetingAsync( string userId, string topic, @@ -107,24 +87,7 @@ public Task CreateInstantMeetingAsync( .AsObject(); } - /// - /// Creates a scheduled meeting for a user. - /// - /// The user Id or email address. - /// Meeting topic. - /// Meeting description. - /// Meeting start time. - /// Meeting duration (minutes). - /// The time zone for start time. - /// Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. - /// Meeting settings. - /// Tracking fields. - /// Template Identifer. - /// The cancellation token. - /// - /// The new . - /// - /// Thrown when an exception occured while creating the meeting. + /// public Task CreateScheduledMeetingAsync( string userId, string topic, @@ -159,25 +122,7 @@ public Task CreateScheduledMeetingAsync( .AsObject(); } - /// - /// Creates a recurring meeting for a user. - /// - /// The user Id or email address. - /// Meeting topic. - /// Meeting description. - /// Meeting start time. If omitted, a 'Recurring meeting with no fixed time' will be created. - /// Meeting duration (minutes). - /// Recurrence information. - /// The time zone for start time. - /// Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. - /// Meeting settings. - /// Tracking fields. - /// Template Identifer. - /// The cancellation token. - /// - /// The new . - /// - /// Thrown when an exception occured while creating the meeting. + /// public Task CreateRecurringMeetingAsync( string userId, string topic, @@ -225,20 +170,7 @@ public Task GetAsync(long meetingId, string occurrenceId = null, bool i .AsObject(); } - /// - /// Update the details of a meeting occurence. - /// - /// The meeting ID. - /// The meeting occurrence id. - /// Meeting description. - /// Meeting start time. - /// Meeting duration (minutes). - /// The time zone for start time. - /// Meeting settings. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateMeetingOccurrenceAsync(long meetingId, string occurrenceId, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, MeetingSettings settings = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -258,23 +190,7 @@ public Task UpdateMeetingOccurrenceAsync(long meetingId, string occurrenceId, st .AsMessage(); } - /// - /// Update the details of a scheduled meeting. - /// - /// The meeting ID. - /// The user Id or email address. - /// Meeting topic. - /// Meeting description. - /// Meeting start time. - /// Meeting duration (minutes). - /// The time zone for start time. - /// Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. - /// Meeting settings. - /// Tracking fields. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateScheduledMeetingAsync(long meetingId, string userId = null, string topic = null, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, string password = null, MeetingSettings settings = null, IDictionary trackingFields = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -297,24 +213,7 @@ public Task UpdateScheduledMeetingAsync(long meetingId, string userId = null, st .AsMessage(); } - /// - /// Update the details of a recurring meeting. - /// - /// The meeting ID. - /// The user Id or email address. - /// Meeting topic. - /// Meeting description. - /// Meeting start time. If omitted, a 'Recurring meeting with no fixed time' will be created. - /// Meeting duration (minutes). - /// The time zone for start time. - /// Recurrence information. - /// Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. - /// Meeting settings. - /// Tracking fields. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateRecurringMeetingAsync(long meetingId, string userId = null, string topic = null, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, RecurrenceInfo recurrence = null, string password = null, MeetingSettings settings = null, IDictionary trackingFields = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -338,17 +237,7 @@ public Task UpdateRecurringMeetingAsync(long meetingId, string userId = null, st .AsMessage(); } - /// - /// Delete a meeting. - /// - /// The meeting ID. - /// The meeting occurrence id. - /// If true, a notification email is sent to the host and alternative host. - /// If true, a notification email is sent to the registrants. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAsync(long meetingId, string occurrenceId = null, bool notifyHost = true, bool notifyRegistrants = false, CancellationToken cancellationToken = default) { return _client @@ -360,14 +249,7 @@ public Task DeleteAsync(long meetingId, string occurrenceId = null, bool notifyH .AsMessage(); } - /// - /// End a meeting. - /// - /// The meeting ID. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task EndAsync(long meetingId, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -382,12 +264,7 @@ public Task EndAsync(long meetingId, CancellationToken cancellationToken = defau .AsMessage(); } - /// - /// Recover a deleted meeting. - /// - /// The meeting ID. - /// The cancellation token. - /// The async task. + /// public Task RecoverAsync(long meetingId, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -402,18 +279,7 @@ public Task RecoverAsync(long meetingId, CancellationToken cancellationToken = d .AsMessage(); } - /// - /// List registrants of a meeting. - /// - /// The meeting ID. - /// The registrant status. - /// The meeting occurrence id. - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetRegistrantsAsync(long meetingId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { @@ -432,18 +298,7 @@ public Task> GetRegistrantsAsync(long meetingId, R .AsPaginatedResponse("registrants"); } - /// - /// List registrants of a meeting. - /// - /// The meeting ID. - /// The registrant status. - /// The meeting occurrence id. - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetRegistrantsAsync(long meetingId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -461,34 +316,7 @@ public Task> GetRegistrantsAsync(long mee .AsPaginatedResponseWithToken("registrants"); } - /// - /// Add a registrant to a meeting. - /// - /// The meeting ID. - /// A valid email address. - /// Registrant's first name. - /// Registrant's last name. - /// Registrant's address. - /// Registrant's city. - /// Registrant's country. - /// Registrant's zip or postal code. - /// Registrant's state or province. - /// Registrant's phone number. - /// Registrant's industry. - /// Registrant's organization. - /// Registrant's job title. - /// This field can be used to gauge interest of attendees towards buying your product or service. - /// Registrant's role in purchase decision. - /// Number of employees. - /// A field that allows registrant to provide any questions or comments that they might have. - /// Answers to the custom registration questions. - /// Registrant's language preference for confirmation emails. - /// Indicates if the registrant should be automatically approved. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// A . - /// + /// public Task AddRegistrantAsync(long meetingId, string email, string firstName, string lastName, string address = null, string city = null, Country? country = null, string postalCode = null, string stateOrProvince = null, string phoneNumber = null, string industry = null, string organization = null, string jobTitle = null, PurchasingTimeFrame? timeFrame = null, RoleInPurchaseProcess? role = null, NumberOfEmployees? employees = null, string comments = null, IEnumerable questionAnswers = null, Language? language = null, bool autoApprove = false, string occurrenceId = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -522,17 +350,7 @@ public Task AddRegistrantAsync(long meetingId, string email, str .AsObject(); } - /// - /// Register up to 30 registrants at once for a meeting that requires registration. - /// - /// The meeting ID. - /// An array of registrants. - /// Indicates if the registrant should be automatically approved. - /// Indicates if send confirmation Email to Registrants. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task PerformBatchRegistrationAsync(long meetingId, IEnumerable registrants, bool autoApprove = false, bool registrantsConfirmationEmail = false, CancellationToken cancellationToken = default) { if (registrants == null || !registrants.Any()) throw new ArgumentNullException(nameof(registrants), "You must provide at least one registrant"); @@ -552,16 +370,7 @@ public Task PerformBatchRegistrationAsync(long meetingId, .AsObject("registrants"); } - /// - /// Delete a meeting registrant. - /// - /// The meeting ID. - /// The registrant id. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteRegistrantAsync(long meetingId, string registrantId, string occurrenceId = null, CancellationToken cancellationToken = default) { return _client @@ -571,15 +380,7 @@ public Task DeleteRegistrantAsync(long meetingId, string registrantId, string oc .AsMessage(); } - /// - /// Retrieve a meeting registrant. - /// - /// The meeting ID. - /// The registrant unique identifier. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetRegistrantAsync(long meetingId, string registrantId, CancellationToken cancellationToken = default) { return _client @@ -588,107 +389,43 @@ public Task GetRegistrantAsync(long meetingId, string registrantId, .AsObject(); } - /// - /// Approve a registration for a meeting. - /// - /// The meeting ID. - /// The registrant ID. - /// The registrant's email address. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantAsync(long meetingId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return ApproveRegistrantsAsync(meetingId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Approve multiple registrations for a meeting. - /// - /// The meeting ID. - /// ID and email for each registrant to be approved. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantsAsync(long meetingId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(meetingId, registrantsInfo, "approve", occurrenceId, cancellationToken); } - /// - /// Reject a registration for a meeting. - /// - /// The meeting ID. - /// The registrant ID. - /// The registrant's email address. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RejectRegistrantAsync(long meetingId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return RejectRegistrantsAsync(meetingId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Reject multiple registrations for a meeting. - /// - /// The meeting ID. - /// ID and email for each registrant to be rejected. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RejectRegistrantsAsync(long meetingId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(meetingId, registrantsInfo, "deny", occurrenceId, cancellationToken); } - /// - /// Cancel a previously approved registration for a meeting. - /// - /// The meeting ID. - /// The registrant ID. - /// The registrant's email address. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task CancelRegistrantAsync(long meetingId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return CancelRegistrantsAsync(meetingId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Cancel multiple previously approved registrations for a meeting. - /// - /// The meeting ID. - /// ID and email for each registrant to be cancelled. - /// The meeting occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task CancelRegistrantsAsync(long meetingId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(meetingId, registrantsInfo, "cancel", occurrenceId, cancellationToken); } - /// - /// Retrieve all polls for a meeting. - /// - /// The meeting id. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetPollsAsync(long meetingId, CancellationToken cancellationToken = default) { return _client @@ -697,16 +434,7 @@ public Task GetPollsAsync(long meetingId, CancellationToken cancellation .AsObject("polls"); } - /// - /// Create a poll for a meeting. - /// - /// The meeting ID. - /// Title for the poll. - /// The poll questions. - /// The cancellation token. - /// - /// A . - /// + /// public Task CreatePollAsync(long meetingId, string title, IEnumerable questions, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -722,15 +450,7 @@ public Task CreatePollAsync(long meetingId, string title, IEnumerable(); } - /// - /// Retrieve a poll. - /// - /// The meeting id. - /// The poll id. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetPollAsync(long meetingId, long pollId, CancellationToken cancellationToken = default) { return _client @@ -739,17 +459,7 @@ public Task GetPollAsync(long meetingId, long pollId, CancellationToken ca .AsObject(); } - /// - /// Update a poll for a meeting. - /// - /// The meeting ID. - /// The poll id. - /// Title for the poll. - /// The poll questions. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdatePollAsync(long meetingId, long pollId, string title, IEnumerable questions, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -765,15 +475,7 @@ public Task UpdatePollAsync(long meetingId, long pollId, string title, IEnumerab .AsMessage(); } - /// - /// Delete a poll for a meeting. - /// - /// The meeting ID. - /// The poll id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeletePollAsync(long meetingId, long pollId, CancellationToken cancellationToken = default) { return _client @@ -782,14 +484,7 @@ public Task DeletePollAsync(long meetingId, long pollId, CancellationToken cance .AsMessage(); } - /// - /// Retrieve the questions that are to be answered by users while registering for a meeting. - /// - /// The meeting ID. - /// The cancellation token. - /// - /// An array of . - /// + /// public async Task GetRegistrationQuestionsAsync(long meetingId, CancellationToken cancellationToken = default) { var response = await _client @@ -813,17 +508,7 @@ public async Task GetRegistrationQuestionsAsync return registrationQuestions; } - /// - /// Update the questions that are to be answered by users while registering for a meeting. - /// - /// The meeting ID. - /// List of fields that must be answer when registering for the meeting. - /// List of fields that can be answer when registering for the meeting. - /// Additional questions to be answered. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateRegistrationQuestionsAsync(long meetingId, IEnumerable requiredFields, IEnumerable optionalFields, IEnumerable customQuestions, CancellationToken cancellationToken = default) { var required = (requiredFields ?? Enumerable.Empty()) @@ -850,14 +535,7 @@ public Task UpdateRegistrationQuestionsAsync(long meetingId, IEnumerable - /// Get the meeting invite note that was sent for a specific meeting. - /// - /// The meeting ID. - /// The cancellation token. - /// - /// The invite note. - /// + /// public Task GetInvitationAsync(long meetingId, CancellationToken cancellationToken = default) { return _client diff --git a/Source/ZoomNet/Resources/PastMeetings.cs b/Source/ZoomNet/Resources/PastMeetings.cs index 59ef4865..97c1bd53 100644 --- a/Source/ZoomNet/Resources/PastMeetings.cs +++ b/Source/ZoomNet/Resources/PastMeetings.cs @@ -6,13 +6,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage meetings that occured in the past. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class PastMeetings : IPastMeetings { private readonly Pathoschild.Http.Client.IClient _client; @@ -51,14 +45,7 @@ public Task> GetParticipantsAsync(string .AsPaginatedResponseWithToken("participants"); } - /// - /// Get a list of ended meeting instance. - /// - /// The meeting identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetInstancesAsync(long meetingId, CancellationToken cancellationToken = default) { return _client @@ -67,14 +54,7 @@ public Task GetInstancesAsync(long meetingId, CancellationToken .AsObject("meetings"); } - /// - /// Get a list of poll results for a meeting that occured in the past. - /// - /// The meeting identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetPollResultsAsync(long meetingId, CancellationToken cancellationToken = default) { return _client @@ -83,17 +63,7 @@ public Task GetPollResultsAsync(long meetingId, CancellationToken .AsObject("questions"); } - /// - /// Get a list of files sent via in-meeting chat during a meeting. - /// - /// - /// The in-meeting files are deleted after 24 hours of the meeting completion time. - /// - /// The meeting identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("This method has been deprecated and is no longer supported due to GCM encryption updates for security purposes")] public Task GetFilesAsync(long meetingId, CancellationToken cancellationToken = default) { diff --git a/Source/ZoomNet/Resources/PastWebinars.cs b/Source/ZoomNet/Resources/PastWebinars.cs index 4ac5dc40..e321a0e3 100644 --- a/Source/ZoomNet/Resources/PastWebinars.cs +++ b/Source/ZoomNet/Resources/PastWebinars.cs @@ -6,12 +6,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage webinars that occured in the past. - /// - /// - /// See Zoom documentation for more information. - /// + /// public class PastWebinars : IPastWebinars { private readonly Pathoschild.Http.Client.IClient _client; @@ -25,16 +20,7 @@ internal PastWebinars(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// List absentees of a webinar that occured in the past. - /// - /// The webinar UUID. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetAbsenteesAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -50,16 +36,7 @@ public Task> GetAbsenteesAsync(string uui .AsPaginatedResponseWithToken("registrants"); } - /// - /// List all the participants who attended a webinar hosted in the past. - /// - /// The webinar identifier. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetParticipantsAsync(long webinarId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -75,14 +52,7 @@ public Task> GetParticipantsAsync(long w .AsPaginatedResponseWithToken("participants"); } - /// - /// Get a list of ended webinar instance. - /// - /// The webinar identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetInstancesAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -91,14 +61,7 @@ public Task GetInstancesAsync(long webinarId, CancellationToken .AsObject("webinars"); } - /// - /// Get a list of poll results for a webinar that occured in the past. - /// - /// The webinar identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetPollResultsAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -107,14 +70,7 @@ public Task GetPollResultsAsync(long webinarId, CancellationToken .AsObject("questions"); } - /// - /// Get a list of Q&A results for a webinar that occured in the past. - /// - /// The webinar identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetQuestionsAndAnswersResultsAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -123,17 +79,7 @@ public Task GetQuestionsAndAnswersResultsAsync(long webinarId, Can .AsObject("questions"); } - /// - /// Get a list of files sent via in-webinar chat during a webinar. - /// - /// - /// The in-webinar files are deleted after 24 hours of the webinar completion time. - /// - /// The webinar identifier. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetFilesAsync(long webinarId, CancellationToken cancellationToken = default) { return _client diff --git a/Source/ZoomNet/Resources/Reports.cs b/Source/ZoomNet/Resources/Reports.cs index 24ab520f..0675d918 100644 --- a/Source/ZoomNet/Resources/Reports.cs +++ b/Source/ZoomNet/Resources/Reports.cs @@ -6,12 +6,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to view various metrics. - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Reports : IReports { private readonly IClient _client; diff --git a/Source/ZoomNet/Resources/Roles.cs b/Source/ZoomNet/Resources/Roles.cs index f8efcba0..485d1570 100644 --- a/Source/ZoomNet/Resources/Roles.cs +++ b/Source/ZoomNet/Resources/Roles.cs @@ -10,13 +10,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage roles. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Roles : IRoles { private readonly Pathoschild.Http.Client.IClient _client; @@ -30,15 +24,7 @@ internal Roles(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Retrieve all roles on your account. - /// - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of users. - /// + /// public Task> GetAllAsync(int recordsPerPage = 300, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -54,16 +40,7 @@ public Task> GetAllAsync(int recordsPerPage = 3 .AsPaginatedResponseWithToken("roles"); } - /// - /// Creates a role. - /// - /// The role name. - /// Role description. - /// Array of assigned access rights as defined HERE. - /// The cancellation token. - /// - /// The new role. - /// + /// public async Task CreateAsync(string name, string description = null, IEnumerable privileges = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -91,16 +68,7 @@ public async Task CreateAsync(string name, string description = null, IEnu } } - /// - /// Retrieve all users assigned to the specified role. - /// - /// The role Id. - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of users. - /// + /// public Task> GetMembersAsync(string roleId, int recordsPerPage = 300, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -116,15 +84,7 @@ public Task> GetMembersAsync(string roleId, int .AsPaginatedResponseWithToken("members"); } - /// - /// Assign users to a role. - /// - /// The role Id. - /// A list of user ids or email addresses. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task AssignUsersAsync(string roleId, IEnumerable userIds, CancellationToken cancellationToken = default) { if (userIds == null || !userIds.Any()) throw new ArgumentNullException(nameof(userIds), "You must provide at least one user Id or email address."); @@ -143,15 +103,7 @@ public Task AssignUsersAsync(string roleId, IEnumerable userIds, Cancell .AsMessage(); } - /// - /// Remove user from a role. - /// - /// The role Id. - /// The user id or email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UnassignUserAsync(string roleId, string userId, CancellationToken cancellationToken = default) { return _client @@ -160,14 +112,7 @@ public Task UnassignUserAsync(string roleId, string userId, CancellationToken ca .AsMessage(); } - /// - /// Retrieve the information of a specific role on a Zoom account. - /// - /// The role Id. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetAsync(string roleId, CancellationToken cancellationToken = default) { return _client @@ -176,17 +121,7 @@ public Task GetAsync(string roleId, CancellationToken cancellationToken = .AsObject(); } - /// - /// Updates an existing role. - /// - /// The role ID. - /// The role name. - /// Role description. - /// Array of assigned access rights as defined HERE. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateRole(string id, string name = null, string description = null, IEnumerable privileges = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -205,14 +140,7 @@ public Task UpdateRole(string id, string name = null, string description = null, .AsMessage(); } - /// - /// Delete a role. - /// - /// The role Id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAsync(string roleId, CancellationToken cancellationToken = default) { return _client diff --git a/Source/ZoomNet/Resources/Users.cs b/Source/ZoomNet/Resources/Users.cs index 23627219..e3a2e504 100644 --- a/Source/ZoomNet/Resources/Users.cs +++ b/Source/ZoomNet/Resources/Users.cs @@ -11,13 +11,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage users. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Users : IUsers { private readonly Pathoschild.Http.Client.IClient _client; @@ -31,17 +25,7 @@ internal Users(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Retrieve all users on your account. - /// - /// The user status. Allowed values: Active, Inactive, pending. - /// Unique identifier for the role. Provide this parameter if you would like to filter the response by a specific role. - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of users. - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetAllAsync(UserStatus status = UserStatus.Active, string roleId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { @@ -60,17 +44,7 @@ public Task> GetAllAsync(UserStatus status = UserStatus. .AsPaginatedResponse("users"); } - /// - /// Retrieve all users on your account. - /// - /// The user status. Allowed values: Active, Inactive, pending. - /// Unique identifier for the role. Provide this parameter if you would like to filter the response by a specific role. - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of users. - /// + /// public Task> GetAllAsync(UserStatus status = UserStatus.Active, string roleId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -88,19 +62,7 @@ public Task> GetAllAsync(UserStatus status = Us .AsPaginatedResponseWithToken("users"); } - /// - /// Creates a user. - /// - /// The email address. - /// First name. - /// Last name. - /// User password. Only used when createType is . - /// The type of user. - /// Specify how to create the user. - /// The cancellation token. - /// - /// The new user. - /// + /// public Task CreateAsync(string email, string firstName = null, string lastName = null, string password = null, UserType type = UserType.Basic, UserCreateType createType = UserCreateType.Normal, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -158,14 +120,7 @@ public Task UpdateAsync(string userId, string firstName = null, string lastName .AsMessage(); } - /// - /// Retrieve the information of a specific user on a Zoom account. - /// - /// The user Id or email address. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -174,18 +129,7 @@ public Task GetAsync(string userId, CancellationToken cancellationToken = .AsObject(); } - /// - /// Delete a user. - /// - /// The user Id or email address. - /// Transfer email. - /// Transfer meetings. - /// Transfer webinars. - /// Transfer recordings. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAsync(string userId, string transferEmail, bool transferMeetings, bool transferWebinars, bool transferRecordings, CancellationToken cancellationToken = default) { return _client @@ -199,18 +143,7 @@ public Task DeleteAsync(string userId, string transferEmail, bool transferMeetin .AsMessage(); } - /// - /// Disassociate a user. - /// - /// The user Id or email address. - /// Transfer email. - /// Transfer meetings. - /// Transfer webinars. - /// Transfer recordings. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DisassociateAsync(string userId, string transferEmail, bool transferMeetings, bool transferWebinars, bool transferRecordings, CancellationToken cancellationToken = default) { return _client @@ -224,14 +157,7 @@ public Task DisassociateAsync(string userId, string transferEmail, bool transfer .AsMessage(); } - /// - /// Retrieve a user's assistants. - /// - /// The user Id. - /// The cancellation token. - /// - /// An array of assistants. - /// + /// public Task GetAssistantsAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -240,15 +166,7 @@ public Task GetAssistantsAsync(string userId, CancellationToken can .AsObject("assistants"); } - /// - /// Add assistants to a user. - /// - /// The user Id. - /// The id of the assistants to associate with this user. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task AddAssistantsByIdAsync(string userId, IEnumerable assistantIds, CancellationToken cancellationToken = default) { if (assistantIds == null || !assistantIds.Any()) throw new ArgumentNullException(nameof(assistantIds), "You must provide at least one assistant Id."); @@ -265,15 +183,7 @@ public Task AddAssistantsByIdAsync(string userId, IEnumerable assistantI .AsMessage(); } - /// - /// Add assistants to a user. - /// - /// The user Id. - /// The email address of the assistants to associate with this user. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task AddAssistantsByEmailAsync(string userId, IEnumerable assistantEmails, CancellationToken cancellationToken = default) { if (assistantEmails == null || !assistantEmails.Any()) throw new ArgumentNullException(nameof(assistantEmails), "You must provide at least one assistant email address."); @@ -290,15 +200,7 @@ public Task AddAssistantsByEmailAsync(string userId, IEnumerable assista .AsMessage(); } - /// - /// Delete a specific assistant of a user. - /// - /// The user Id. - /// The id of the assistant to disassociate from this user. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAssistantAsync(string userId, string assistantId, CancellationToken cancellationToken = default) { return _client @@ -307,14 +209,7 @@ public Task DeleteAssistantAsync(string userId, string assistantId, Cancellation .AsMessage(); } - /// - /// Delete all assistants of a user. - /// - /// The user Id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAllAssistantsAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -323,14 +218,7 @@ public Task DeleteAllAssistantsAsync(string userId, CancellationToken cancellati .AsMessage(); } - /// - /// Retrieve a user's schedulers. - /// - /// The user Id. - /// The cancellation token. - /// - /// An array of schedulers. - /// + /// public Task GetSchedulersAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -339,15 +227,7 @@ public Task GetSchedulersAsync(string userId, CancellationToken can .AsObject("schedulers"); } - /// - /// Delete a specific scheduler of a user. - /// - /// The user Id. - /// The id of the scheduler to disassociate from this user. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteSchedulerAsync(string userId, string assistantId, CancellationToken cancellationToken = default) { return _client @@ -356,14 +236,7 @@ public Task DeleteSchedulerAsync(string userId, string assistantId, Cancellation .AsMessage(); } - /// - /// Delete all schedulers of a user. - /// - /// The user Id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAllSchedulersAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -372,20 +245,7 @@ public Task DeleteAllSchedulersAsync(string userId, CancellationToken cancellati .AsMessage(); } - /// - /// Upload a user's profile picture. - /// - /// The user Id. - /// The file name. - /// The binary data. - /// The cancellation token. - /// - /// The async task. - /// - /// - /// File size cannot exceed 2M. - /// Only jpg/jpeg, gif or png image file can be uploaded. - /// + /// public Task UploadProfilePictureAsync(string userId, string fileName, Stream pictureData, CancellationToken cancellationToken = default) { return _client @@ -415,14 +275,7 @@ public Task DeleteProfilePictureAsync(string userId, CancellationToken cancellat .AsMessage(); } - /// - /// Retrieve a user's settings. - /// - /// The user Id. - /// The cancellation token. - /// - /// The settings. - /// + /// public Task GetSettingsAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -431,14 +284,7 @@ public Task GetSettingsAsync(string userId, CancellationToken canc .AsObject(); } - /// - /// Retrieve a user's meeting authentication settings. - /// - /// The user Id. - /// The cancellation token. - /// - /// The settings. - /// + /// public async Task GetMeetingAuthenticationSettingsAsync(string userId, CancellationToken cancellationToken = default) { var response = await _client @@ -457,14 +303,7 @@ public async Task GetMeetingAuthenticationSettingsAsync( return settings; } - /// - /// Retrieve a user's recording authentication settings. - /// - /// The user Id. - /// The cancellation token. - /// - /// The settings. - /// + /// public async Task GetRecordingAuthenticationSettingsAsync(string userId, CancellationToken cancellationToken = default) { var response = await _client @@ -493,14 +332,7 @@ public Task GetSecuritySettingsAsync(string userId, Cancellati .AsObject("meeting_security"); } - /// - /// Deactivate a specific user on a Zoom account. - /// - /// The user Id or email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeactivateAsync(string userId, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -515,14 +347,7 @@ public Task DeactivateAsync(string userId, CancellationToken cancellationToken = .AsMessage(); } - /// - /// Reactivate a specific user on a Zoom account. - /// - /// The user Id or email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ReactivateAsync(string userId, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -537,15 +362,7 @@ public Task ReactivateAsync(string userId, CancellationToken cancellationToken = .AsMessage(); } - /// - /// Change the password of a user. - /// - /// The user Id or email address. - /// The password. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ChangePasswordAsync(string userId, string password, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -560,14 +377,7 @@ public Task ChangePasswordAsync(string userId, string password, CancellationToke .AsMessage(); } - /// - /// Retrieve the permissions that have been granted to a user. - /// - /// The user Id or email address. - /// The cancellation token. - /// - /// An array of strings. - /// + /// public Task GetPermissionsAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -576,14 +386,7 @@ public Task GetPermissionsAsync(string userId, CancellationToken cance .AsObject("permissions"); } - /// - /// Revoke a user's SSO token. - /// - /// The user Id or email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RevokeSsoTokenAsync(string userId, CancellationToken cancellationToken = default) { return _client @@ -592,14 +395,7 @@ public Task RevokeSsoTokenAsync(string userId, CancellationToken cancellationTok .AsMessage(); } - /// - /// Verify if a user's email is registered with Zoom. - /// - /// The email address. - /// The cancellation token. - /// - /// true if the email is registered to a user within your account. - /// + /// public Task CheckEmailInUseAsync(string email, CancellationToken cancellationToken = default) { return _client @@ -609,15 +405,7 @@ public Task CheckEmailInUseAsync(string email, CancellationToken cancellat .AsObject("existed_email"); } - /// - /// Change a user's email address on a Zoom account that has managed domain set up. - /// - /// The user Id or email address. - /// The email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ChangeEmailAsync(string userId, string email, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -632,14 +420,7 @@ public Task ChangeEmailAsync(string userId, string email, CancellationToken canc .AsMessage(); } - /// - /// Verify if a personal meeting room with the given name exists or not. - /// - /// The room name. - /// The cancellation token. - /// - /// true if a room with the given name exists. - /// + /// public Task CheckPersonalMeetingRoomNameInUseAsync(string name, CancellationToken cancellationToken = default) { return _client @@ -649,16 +430,7 @@ public Task CheckPersonalMeetingRoomNameInUseAsync(string name, Cancellati .AsObject("existed"); } - /// - /// Disassociate a user from one account and move the user to another account under the same master account. - /// - /// The user Id or email address. - /// The current account id. - /// The new account id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task SwitchAccountAsync(string userId, string currentAccountId, string newAccountId, CancellationToken cancellationToken = default) { var data = new JsonObject diff --git a/Source/ZoomNet/Resources/Webinars.cs b/Source/ZoomNet/Resources/Webinars.cs index 54c3b8e0..0673d17f 100644 --- a/Source/ZoomNet/Resources/Webinars.cs +++ b/Source/ZoomNet/Resources/Webinars.cs @@ -9,13 +9,7 @@ namespace ZoomNet.Resources { - /// - /// Allows you to manage webinars. - /// - /// - /// - /// See Zoom documentation for more information. - /// + /// public class Webinars : IWebinars { private readonly Pathoschild.Http.Client.IClient _client; @@ -62,24 +56,7 @@ public Task> GetAllAsync(string userI .AsPaginatedResponseWithToken("webinars"); } - /// - /// Creates a scheduled webinar for a user. - /// - /// The user Id or email address. - /// Webinar topic. - /// Webinar description. - /// Webinar start time. - /// Webinar duration (minutes). - /// The time zone for start time. - /// Password to join the webinar. By default the password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. This can be updated within Zoom account settings. - /// Webinar settings. - /// Tracking fields. - /// Template Identifer. If passed in, Zoom advise using the userId in the field, rather than email address. - /// The cancellation token. - /// - /// The new webinar. - /// - /// Thrown when an exception occured while creating the webinar. + /// public Task CreateScheduledWebinarAsync(string userId, string topic, string agenda, DateTime start, int duration, TimeZones? timeZone = TimeZones.UTC, string password = null, WebinarSettings settings = null, IDictionary trackingFields = null, string templateId = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -103,25 +80,7 @@ public Task CreateScheduledWebinarAsync(string userId, string .AsObject(); } - /// - /// Creates a recurring webinar for a user. - /// - /// The user Id or email address. - /// Webinar topic. - /// Webinar description. - /// Webinar start time. - /// Webinar duration (minutes). - /// Recurrence information. - /// The time zone for start time. - /// Password to join the webinar. By default the password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. This can be updated within Zoom account settings. - /// Webinar settings. - /// Tracking fields. - /// Template Identifer. If passed in, Zoom advise using the userId in the field, rather than email address. - /// The cancellation token. - /// - /// The new webinar. - /// - /// Thrown when an exception occured while creating the webinar. + /// public Task CreateRecurringWebinarAsync(string userId, string topic, string agenda, DateTime? start, int duration, RecurrenceInfo recurrence, TimeZones? timeZone = TimeZones.UTC, string password = null, WebinarSettings settings = null, IDictionary trackingFields = null, string templateId = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -146,20 +105,7 @@ public Task CreateRecurringWebinarAsync(string userId, string .AsObject(); } - /// - /// Update the details of a webinar occurence. - /// - /// The webinar ID. - /// The webinar occurrence id. - /// Webinar description. - /// Webinar start time. - /// Webinar duration (minutes). - /// The time zone for start time. - /// Webinar settings. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateWebinarOccurrenceAsync(long webinarId, string occurrenceId, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, WebinarSettings settings = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -179,22 +125,7 @@ public Task UpdateWebinarOccurrenceAsync(long webinarId, string occurrenceId, st .AsMessage(); } - /// - /// Updates an existing scheduled webinar. - /// - /// The webinar ID. - /// Webinar topic. - /// Webinar description. - /// Webinar start time. - /// Webinar duration (minutes). - /// The time zone for start time. - /// Password to join the webinar. By default the password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. This can be updated within Zoom account settings. - /// Webinar settings. - /// Tracking fields. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateScheduledWebinarAsync(long webinarId, string topic = null, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, string password = null, WebinarSettings settings = null, IDictionary trackingFields = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -217,23 +148,7 @@ public Task UpdateScheduledWebinarAsync(long webinarId, string topic = null, str .AsMessage(); } - /// - /// Updates an existing recurring webinar for a user. - /// - /// The webinar ID. - /// Webinar topic. - /// Webinar description. - /// Webinar start time. - /// Webinar duration (minutes). - /// The time zone for start time. - /// Recurrence information. - /// Password to join the webinar. By default the password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters. This can be updated within Zoom account settings. - /// Webinar settings. - /// Tracking fields. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateRecurringWebinarAsync(long webinarId, string topic = null, string agenda = null, DateTime? start = null, int? duration = null, TimeZones? timeZone = null, RecurrenceInfo recurrence = null, string password = null, WebinarSettings settings = null, IDictionary trackingFields = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -268,16 +183,7 @@ public Task GetAsync(long webinarId, string occurrenceId = null, bool i .AsObject(); } - /// - /// Delete a webinar. - /// - /// The webinar ID. - /// The webinar occurrence id. - /// If true, a notification email is sent to the panelists and registrants. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteAsync(long webinarId, string occurrenceId = null, bool sendNotification = false, CancellationToken cancellationToken = default) { return _client @@ -288,14 +194,7 @@ public Task DeleteAsync(long webinarId, string occurrenceId = null, bool sendNot .AsMessage(); } - /// - /// End a webinar. - /// - /// The webinar ID. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task EndAsync(long webinarId, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -310,14 +209,7 @@ public Task EndAsync(long webinarId, CancellationToken cancellationToken = defau .AsMessage(); } - /// - /// List panelists of a webinar. - /// - /// The webinar ID. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetPanelistsAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -326,31 +218,13 @@ public Task GetPanelistsAsync(long webinarId, CancellationToken canc .AsObject("panelists"); } - /// - /// Add a single panelist to a webinar. - /// - /// The webinar ID. - /// Panelist's email address. - /// Panelist's full name. - /// The virtual background ID to bind. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task AddPanelistAsync(long webinarId, string email, string fullName, string virtualBackgroundId = null, CancellationToken cancellationToken = default) { return AddPanelistsAsync(webinarId, new[] { (email, fullName, virtualBackgroundId) }, cancellationToken); } - /// - /// Add multiple panelists to a webinar. - /// - /// The webinar ID. - /// The panelists to add to the webinar. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task AddPanelistsAsync(long webinarId, IEnumerable<(string Email, string FullName, string VirtualBackgroundId)> panelists, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -372,15 +246,7 @@ public Task AddPanelistsAsync(long webinarId, IEnumerable<(string Email, string .AsMessage(); } - /// - /// Remove a single panelist from a webinar. - /// - /// The webinar ID. - /// Panelist's email address. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RemovePanelistAsync(long webinarId, string panelistId, CancellationToken cancellationToken = default) { return _client @@ -389,14 +255,7 @@ public Task RemovePanelistAsync(long webinarId, string panelistId, CancellationT .AsMessage(); } - /// - /// Remove all panelists from a webinar. - /// - /// The webinar ID. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RemoveAllPanelistsAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -405,19 +264,7 @@ public Task RemoveAllPanelistsAsync(long webinarId, CancellationToken cancellati .AsMessage(); } - /// - /// List the users that have registered for a webinar. - /// - /// The webinar ID. - /// The registrant status. - /// The tracking source ID. - /// The webinar occurrence id. - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetRegistrantsAsync(long webinarId, RegistrantStatus status, string trackingSourceId = null, string occurrenceId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { @@ -437,19 +284,7 @@ public Task> GetRegistrantsAsync(long webinarId, R .AsPaginatedResponse("registrants"); } - /// - /// List the users that have registered for a webinar. - /// - /// The webinar ID. - /// The registrant status. - /// The tracking source ID. - /// The webinar occurrence id. - /// The number of records returned within a single API call. - /// The paging token. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task> GetRegistrantsAsync(long webinarId, RegistrantStatus status, string trackingSourceId = null, string occurrenceId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -468,16 +303,7 @@ public Task> GetRegistrantsAsync(long web .AsPaginatedResponseWithToken("registrants"); } - /// - /// Get details on a specific user who registered for a webinar. - /// - /// The webinar ID. - /// The registrant ID. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetRegistrantAsync(long webinarId, string registrantId, string occurrenceId = null, CancellationToken cancellationToken = default) { return _client @@ -487,33 +313,7 @@ public Task GetRegistrantAsync(long webinarId, string registrantId, .AsObject(); } - /// - /// Add a registrant to a webinar. - /// - /// The webinar ID. - /// A valid email address. - /// Registrant's first name. - /// Registrant's last name. - /// Registrant's address. - /// Registrant's city. - /// Registrant's country. - /// Registrant's zip or postal code. - /// Registrant's state or province. - /// Registrant's phone number. - /// Registrant's industry. - /// Registrant's organization. - /// Registrant's job title. - /// This field can be used to gauge interest of attendees towards buying your product or service. - /// Registrant's role in purchase decision. - /// Number of employees. - /// A field that allows registrant to provide any questions or comments that they might have. - /// Answers to the custom registration questions. - /// Registrant's language preference for confirmation emails. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// A . - /// + /// public Task AddRegistrantAsync(long webinarId, string email, string firstName, string lastName, string address = null, string city = null, Country? country = null, string postalCode = null, string stateOrProvince = null, string phoneNumber = null, string industry = null, string organization = null, string jobTitle = null, PurchasingTimeFrame? timeFrame = null, RoleInPurchaseProcess? role = null, NumberOfEmployees? employees = null, string comments = null, IEnumerable questionAnswers = null, Language? language = null, string occurrenceId = null, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -546,16 +346,7 @@ public Task AddRegistrantAsync(long webinarId, string email, str .AsObject(); } - /// - /// Register up to 30 registrants at once for a webinar that requires registration. - /// - /// The webinar ID. - /// An array of registrants. - /// Indicates if the registrant should be automatically approved. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task PerformBatchRegistrationAsync(long webinarId, IEnumerable registrants, bool autoApprove = false, CancellationToken cancellationToken = default) { if (registrants == null || !registrants.Any()) throw new ArgumentNullException(nameof(registrants), "You must provide at least one registrant"); @@ -574,16 +365,7 @@ public Task PerformBatchRegistrationAsync(long webinarId, .AsObject("registrants"); } - /// - /// Delete a webinar registrant. - /// - /// The webinar ID. - /// The registrant id. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeleteRegistrantAsync(long webinarId, string registrantId, string occurrenceId = null, CancellationToken cancellationToken = default) { return _client @@ -593,107 +375,43 @@ public Task DeleteRegistrantAsync(long webinarId, string registrantId, string oc .AsMessage(); } - /// - /// Approve a registration for a webinar. - /// - /// The webinar ID. - /// The registrant ID. - /// The registrant's email address. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantAsync(long webinarId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return ApproveRegistrantsAsync(webinarId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Approve multiple registrations for a webinar. - /// - /// The webinar ID. - /// ID and email for each registrant to be approved. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task ApproveRegistrantsAsync(long webinarId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(webinarId, registrantsInfo, "approve", occurrenceId, cancellationToken); } - /// - /// Reject a registration for a webinar. - /// - /// The webinar ID. - /// The registrant ID. - /// The registrant's email address. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RejectRegistrantAsync(long webinarId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return RejectRegistrantsAsync(webinarId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Reject multiple registrations for a webinar. - /// - /// The webinar ID. - /// ID and email for each registrant to be rejected. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task RejectRegistrantsAsync(long webinarId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(webinarId, registrantsInfo, "deny", occurrenceId, cancellationToken); } - /// - /// Cancel a previously approved registration for a webinar. - /// - /// The webinar ID. - /// The registrant ID. - /// The registrant's email address. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task CancelRegistrantAsync(long webinarId, string registrantId, string registrantEmail, string occurrenceId = null, CancellationToken cancellationToken = default) { return CancelRegistrantsAsync(webinarId, new[] { (registrantId, registrantEmail) }, occurrenceId, cancellationToken); } - /// - /// Cancel multiple previously approved registrations for a webinar. - /// - /// The webinar ID. - /// ID and email for each registrant to be cancelled. - /// The webinar occurrence id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task CancelRegistrantsAsync(long webinarId, IEnumerable<(string RegistrantId, string RegistrantEmail)> registrantsInfo, string occurrenceId = null, CancellationToken cancellationToken = default) { return UpdateRegistrantsStatusAsync(webinarId, registrantsInfo, "cancel", occurrenceId, cancellationToken); } - /// - /// Retrieve all polls for a webinar. - /// - /// The webinar id. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetPollsAsync(long webinarId, CancellationToken cancellationToken = default) { return _client @@ -702,16 +420,7 @@ public Task GetPollsAsync(long webinarId, CancellationToken cancellation .AsObject("polls"); } - /// - /// Create a poll for a webinar. - /// - /// The webinar ID. - /// Title for the poll. - /// The poll questions. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task CreatePoll(long webinarId, string title, IEnumerable questions, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -727,15 +436,7 @@ public Task CreatePoll(long webinarId, string title, IEnumerable(); } - /// - /// Retrieve a poll. - /// - /// The webinar id. - /// The poll id. - /// The cancellation token. - /// - /// The . - /// + /// public Task GetPollAsync(long webinarId, long pollId, CancellationToken cancellationToken = default) { return _client @@ -744,17 +445,7 @@ public Task GetPollAsync(long webinarId, long pollId, CancellationToken ca .AsObject(); } - /// - /// Update a poll for a webinar. - /// - /// The webinar ID. - /// The poll id. - /// Title for the poll. - /// The poll questions. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdatePollAsync(long webinarId, long pollId, string title, IEnumerable questions, CancellationToken cancellationToken = default) { var data = new JsonObject @@ -770,15 +461,7 @@ public Task UpdatePollAsync(long webinarId, long pollId, string title, IEnumerab .AsMessage(); } - /// - /// Delete a poll for a webinar. - /// - /// The webinar ID. - /// The poll id. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task DeletePollAsync(long webinarId, long pollId, CancellationToken cancellationToken = default) { return _client @@ -787,14 +470,7 @@ public Task DeletePollAsync(long webinarId, long pollId, CancellationToken cance .AsMessage(); } - /// - /// Retrieve the questions that are to be answered by users while registering for a webinar. - /// - /// The webinar ID. - /// The cancellation token. - /// - /// An array of . - /// + /// public async Task GetRegistrationQuestionsAsync(long webinarId, CancellationToken cancellationToken = default) { var response = await _client @@ -818,17 +494,7 @@ public async Task GetRegistrationQuestionsAsync return registrationQuestions; } - /// - /// Update the questions that are to be answered by users while registering for a webinar. - /// - /// The webinar ID. - /// List of fields that must be answer when registering for the webinar. - /// List of fields that can be answer when registering for the webinar. - /// Additional questions to be answered. - /// The cancellation token. - /// - /// The async task. - /// + /// public Task UpdateRegistrationQuestionsAsync(long webinarId, IEnumerable requiredFields, IEnumerable optionalFields, IEnumerable customQuestions, CancellationToken cancellationToken = default) { var required = (requiredFields ?? Enumerable.Empty()) @@ -855,14 +521,7 @@ public Task UpdateRegistrationQuestionsAsync(long webinarId, IEnumerable - /// Retrieve all the tracking sources of a webinar. - /// - /// The webinar id. - /// The cancellation token. - /// - /// An array of . - /// + /// public Task GetTrackingSourcesAsync(long webinarId, CancellationToken cancellationToken = default) { return _client From b37441f1b83d7dbc9607c120e692febe4528f8ad Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 12:46:07 -0400 Subject: [PATCH 10/11] (doc) Remove duplicate XML comments --- Source/ZoomNet/WebhookParser.cs | 2 +- Source/ZoomNet/ZoomClient.cs | 102 ++++++-------------------------- 2 files changed, 18 insertions(+), 86 deletions(-) diff --git a/Source/ZoomNet/WebhookParser.cs b/Source/ZoomNet/WebhookParser.cs index d80293c2..44ba51c9 100644 --- a/Source/ZoomNet/WebhookParser.cs +++ b/Source/ZoomNet/WebhookParser.cs @@ -7,7 +7,7 @@ namespace ZoomNet { /// - /// Allows parsing of information posted from Zoom. + /// Allows parsing of Webhooks posted from Zoom. /// public class WebhookParser : IWebhookParser { diff --git a/Source/ZoomNet/ZoomClient.cs b/Source/ZoomNet/ZoomClient.cs index 038ecb25..7b65b1cd 100644 --- a/Source/ZoomNet/ZoomClient.cs +++ b/Source/ZoomNet/ZoomClient.cs @@ -64,114 +64,50 @@ public static string Version } } - /// - /// Gets the resource which allows you to manage sub accounts. - /// - /// - /// The accounts resource. - /// + /// public IAccounts Accounts { get; private set; } - /// - /// Gets the resource which allows you to manage chat channels, messages, etc. - /// - /// - /// The chat resource. - /// + /// public IChat Chat { get; private set; } - /// - /// Gets the resource which allows you to manage cloud recordings. - /// - /// - /// The recordings resource. - /// + /// public ICloudRecordings CloudRecordings { get; private set; } - /// - /// Gets the resource which allows you to manage contacts. - /// - /// - /// The contacts resource. - /// + /// public IContacts Contacts { get; private set; } - /// - /// Gets the resource which allows you to notify Zoom that you comply with the policy which requires - /// you to handle user's data in accordance to the user's preference after the user uninstalls your app. - /// - /// - /// The data compliance resource. - /// + /// [Obsolete("The Data Compliance API is deprecated")] public IDataCompliance DataCompliance { get; private set; } - /// - /// Gets the resource which allows you to manage meetings. - /// - /// - /// The meetings resource. - /// + /// public IMeetings Meetings { get; private set; } - /// - /// Gets the resource which allows you to manage meetings that occured in the past. - /// - /// - /// The past meetings resource. - /// + /// public IPastMeetings PastMeetings { get; private set; } - /// - /// Gets the resource which allows you to manage webinars that occured in the past. - /// - /// - /// The past webinars resource. - /// + /// public IPastWebinars PastWebinars { get; private set; } - /// - /// Gets the resource which allows you to manage roles. - /// - /// - /// The roles resource. - /// + /// public IRoles Roles { get; private set; } - /// - /// Gets the resource which allows you to manage users. - /// - /// - /// The users resource. - /// + /// public IUsers Users { get; private set; } - /// - /// Gets the resource which allows you to manage webinars. - /// - /// - /// The webinars resource. - /// + /// public IWebinars Webinars { get; private set; } - /// - /// Gets the resource which allows you to view metrics. - /// + /// public IDashboards Dashboards { get; private set; } - /// - /// Gets the resource which allows you to view reports. - /// + /// public IReports Reports { get; private set; } - /// - /// Gets the resource which allows you to manage call logs. - /// + /// public ICallLogs CallLogs { get; private set; } - /// - /// Gets the resource which allows you to manage chatbot messages. - /// + /// public IChatbot Chatbot { get; private set; } /// @@ -180,9 +116,7 @@ public static string Version /// public ISms Sms { get; private set; } - /// - /// Gets the resource that allows you to manage groups. - /// + /// public IGroups Groups { get; private set; } #endregion @@ -310,9 +244,7 @@ private ZoomClient(IConnectionInfo connectionInfo, HttpClient httpClient, bool d #region PUBLIC METHODS - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// + /// public void Dispose() { // Call 'Dispose' to release resources From 154e5380d16cb74977ad3ce158bbf8725b78cde5 Mon Sep 17 00:00:00 2001 From: Jericho Date: Fri, 25 Oct 2024 19:41:07 -0400 Subject: [PATCH 11/11] Refresh build script --- GitVersion.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GitVersion.yml b/GitVersion.yml index 89ee6ad4..f9580a72 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1 +1,7 @@ workflow: GitFlow/v1 # https://github.com/GitTools/GitVersion/blob/main/docs/input/docs/reference/configuration.md#snippet-/docs/workflows/GitFlow/v1.yml + +branches: + develop: + label: beta # default is 'alpha' for the 'develop' branch. I prefer 'beta'. + release: + label: rc # default is 'beta' for the 'release' branch. I prefer 'RC'.