From c18f1a2822d4be2639e8710220530f070dcaf0fe Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:01:51 -0400 Subject: [PATCH 1/9] (GH-46) Remove PageCount from PaginatedResponseWithToken --- Source/ZoomNet/Extensions/Internal.cs | 1 - Source/ZoomNet/Models/PaginatedResponseWithToken.cs | 7 ------- 2 files changed, 8 deletions(-) diff --git a/Source/ZoomNet/Extensions/Internal.cs b/Source/ZoomNet/Extensions/Internal.cs index 8a9931fb..126a9d0d 100644 --- a/Source/ZoomNet/Extensions/Internal.cs +++ b/Source/ZoomNet/Extensions/Internal.cs @@ -614,7 +614,6 @@ private static async Task> AsPaginatedResponseWith var result = new PaginatedResponseWithToken() { NextPageToken = jObject.Property("next_page_token").Value.ToString(), - PageCount = jObject.Property("page_count").Value.ToObject(), PageSize = jObject.Property("page_size").Value.ToObject(), Records = jObject.Property(propertyName).Value.ToObject(serializer), TotalRecords = jObject.Property("total_records").Value.ToObject() diff --git a/Source/ZoomNet/Models/PaginatedResponseWithToken.cs b/Source/ZoomNet/Models/PaginatedResponseWithToken.cs index 4514d6f2..35660147 100644 --- a/Source/ZoomNet/Models/PaginatedResponseWithToken.cs +++ b/Source/ZoomNet/Models/PaginatedResponseWithToken.cs @@ -8,13 +8,6 @@ namespace ZoomNet.Models /// The type of records. public class PaginatedResponseWithToken { - /// - /// Gets or sets the number of items returned on this page. - /// - /// The number of items returned on this page. - [JsonProperty(PropertyName = "page_count")] - public int PageCount { get; set; } - /// /// Gets or sets the number of records returned within a single API call. /// From 598d1ccfd2fe77980bbb315fe862451bf865c347 Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:02:28 -0400 Subject: [PATCH 2/9] (GH-46) Add convenience property to indicate if more records are available --- Source/ZoomNet/Models/PaginatedResponseWithToken.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/ZoomNet/Models/PaginatedResponseWithToken.cs b/Source/ZoomNet/Models/PaginatedResponseWithToken.cs index 35660147..0fba6c0b 100644 --- a/Source/ZoomNet/Models/PaginatedResponseWithToken.cs +++ b/Source/ZoomNet/Models/PaginatedResponseWithToken.cs @@ -35,5 +35,11 @@ public class PaginatedResponseWithToken /// /// The records. public T[] Records { get; set; } + + /// + /// Gets a value indicating whether more records are available. + /// + /// true if more records are available; false otherwise. + public bool MoreRecordsAvailable => !string.IsNullOrEmpty(NextPageToken); } } From 63f9a81d9f112c346c21ae2113f67e655bea1237 Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:03:54 -0400 Subject: [PATCH 3/9] (GH-46) Provide overload for Meetings.GetAll and Meetings.GetRegistrantsAsync that accept a paging token --- Source/ZoomNet/Resources/IMeetings.cs | 32 +++++++++++++++ Source/ZoomNet/Resources/Meetings.cs | 58 +++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/Source/ZoomNet/Resources/IMeetings.cs b/Source/ZoomNet/Resources/IMeetings.cs index ed4a30da..1508c8bd 100644 --- a/Source/ZoomNet/Resources/IMeetings.cs +++ b/Source/ZoomNet/Resources/IMeetings.cs @@ -28,8 +28,25 @@ public interface IMeetings /// /// This call omits 'occurrences'. Therefore the 'Occurrences' property will be empty. /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default); + /// + /// Retrieve all meetings of the specified type for a user. + /// + /// The user Id or email address. + /// The type of meetings. Allowed values: Scheduled, Live, Upcoming. + /// The number of records returned within a single API call. + /// The paging token. + /// The cancellation token. + /// + /// An array of meetings. + /// + /// + /// This call omits 'occurrences'. Therefore the 'Occurrences' property will be empty. + /// + Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + /// /// Creates an instant meeting for a user. /// @@ -128,8 +145,23 @@ public interface IMeetings /// /// An array of . /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] Task> GetRegistrantsAsync(long meetingId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default); + /// + /// 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 . + /// + Task> GetRegistrantsAsync(long meetingId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + /// /// Add a registrant to a meeting. /// diff --git a/Source/ZoomNet/Resources/Meetings.cs b/Source/ZoomNet/Resources/Meetings.cs index 97b5e747..a097ad14 100644 --- a/Source/ZoomNet/Resources/Meetings.cs +++ b/Source/ZoomNet/Resources/Meetings.cs @@ -42,6 +42,7 @@ internal Meetings(Pathoschild.Http.Client.IClient client) /// /// An array of . /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -58,6 +59,33 @@ public Task> GetAllAsync(string userId, MeetingListTy .AsPaginatedResponse("meetings", new MeetingConverter()); } + /// + /// Retrieve all meetings of the specified type for a user. + /// + /// The user Id or email address. + /// The type of meetings. Allowed values: Scheduled, Live, Upcoming. + /// The number of records returned within a single API call. + /// The paging token. + /// The cancellation token. + /// + /// An array of . + /// + public Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + if (recordsPerPage < 1 || recordsPerPage > 300) + { + throw new ArgumentOutOfRangeException(nameof(recordsPerPage), "Records per page must be between 1 and 300"); + } + + return _client + .GetAsync($"users/{userId}/meetings") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("meetings", new MeetingConverter()); + } + /// /// Creates an instant meeting for a user. /// @@ -268,6 +296,7 @@ public Task EndAsync(long meetingId, CancellationToken cancellationToken = defau /// /// 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) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -285,6 +314,35 @@ 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) + { + throw new ArgumentOutOfRangeException(nameof(recordsPerPage), "Records per page must be between 1 and 300"); + } + + return _client + .GetAsync($"meetings/{meetingId}/registrants") + .WithArgument("status", JToken.Parse(JsonConvert.SerializeObject(status)).ToString()) + .WithArgument("occurrence_id", occurrenceId) + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("registrants"); + } + /// /// Add a registrant to a meeting. /// From c380ae8b8308b9d22549ef9c9640af52a047a024 Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:07:06 -0400 Subject: [PATCH 4/9] (GH-46) Make sure the name of the paging token parameter is consistent --- Source/ZoomNet/Resources/IPastMeetings.cs | 4 ++-- Source/ZoomNet/Resources/IPastWebinars.cs | 4 ++-- Source/ZoomNet/Resources/PastMeetings.cs | 6 +++--- Source/ZoomNet/Resources/PastWebinars.cs | 7 +++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/ZoomNet/Resources/IPastMeetings.cs b/Source/ZoomNet/Resources/IPastMeetings.cs index 52b70764..5496ed9e 100644 --- a/Source/ZoomNet/Resources/IPastMeetings.cs +++ b/Source/ZoomNet/Resources/IPastMeetings.cs @@ -27,12 +27,12 @@ public interface IPastMeetings /// /// The meeting UUID. /// The number of records to return. - /// The page token. + /// The paging token. /// The cancellation token. /// /// An array of . /// - Task> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pageToken = null, CancellationToken cancellationToken = default); + Task> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); /// /// Get a list of ended meeting instance. diff --git a/Source/ZoomNet/Resources/IPastWebinars.cs b/Source/ZoomNet/Resources/IPastWebinars.cs index f80e1eed..9161b846 100644 --- a/Source/ZoomNet/Resources/IPastWebinars.cs +++ b/Source/ZoomNet/Resources/IPastWebinars.cs @@ -17,12 +17,12 @@ public interface IPastWebinars /// /// The webinar UUID. /// The number of records to return. - /// The page token. + /// The paging token. /// The cancellation token. /// /// An array of . /// - Task> GetAbsenteesAsync(string uuid, int recordsPerPage = 30, string pageToken = null, CancellationToken cancellationToken = default); + Task> GetAbsenteesAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); /// /// Get a list of ended webinar instance. diff --git a/Source/ZoomNet/Resources/PastMeetings.cs b/Source/ZoomNet/Resources/PastMeetings.cs index de5d5e11..1438c396 100644 --- a/Source/ZoomNet/Resources/PastMeetings.cs +++ b/Source/ZoomNet/Resources/PastMeetings.cs @@ -48,12 +48,12 @@ public Task GetAsync(string uuid, CancellationToken cancellationToken = /// /// The meeting UUID. /// The number of records to return. - /// The page token. + /// The paging token. /// The cancellation token. /// /// An array of . /// - public Task> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pageToken = null, CancellationToken cancellationToken = default) + public Task> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -63,7 +63,7 @@ public Task> GetParticipantsAsync(string return _client .GetAsync($"past_meetings/{uuid}/participants") .WithArgument("page_size", recordsPerPage) - .WithArgument("next_page_token", pageToken) + .WithArgument("next_page_token", pagingToken) .WithCancellationToken(cancellationToken) .AsPaginatedResponseWithToken("participants"); } diff --git a/Source/ZoomNet/Resources/PastWebinars.cs b/Source/ZoomNet/Resources/PastWebinars.cs index 2bbeea96..cb3c4b87 100644 --- a/Source/ZoomNet/Resources/PastWebinars.cs +++ b/Source/ZoomNet/Resources/PastWebinars.cs @@ -3,7 +3,6 @@ using System.Threading; using System.Threading.Tasks; using ZoomNet.Models; -using ZoomNet.Utilities; namespace ZoomNet.Resources { @@ -31,12 +30,12 @@ internal PastWebinars(Pathoschild.Http.Client.IClient client) /// /// The webinar UUID. /// The number of records to return. - /// The page token. + /// The paging token. /// The cancellation token. /// /// An array of . /// - public Task> GetAbsenteesAsync(string uuid, int recordsPerPage = 30, string pageToken = null, CancellationToken cancellationToken = default) + public Task> GetAbsenteesAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -46,7 +45,7 @@ public Task> GetAbsenteesAsync(string uu return _client .GetAsync($"past_webinars/{uuid}/absentees") .WithArgument("page_size", recordsPerPage) - .WithArgument("next_page_token", pageToken) + .WithArgument("next_page_token", pagingToken) .WithCancellationToken(cancellationToken) .AsPaginatedResponseWithToken("registrants"); } From f9783101afbd4d9e5093737024d5b99b83432431 Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:16:19 -0400 Subject: [PATCH 5/9] (GH-46) (GH-46) Provide overload for Webinars.GetAllAsync and Webinars.GetRegistrantsAsync that accept a paging token --- Source/ZoomNet/Resources/IWebinars.cs | 28 ++++++++++++++ Source/ZoomNet/Resources/Webinars.cs | 56 +++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/Source/ZoomNet/Resources/IWebinars.cs b/Source/ZoomNet/Resources/IWebinars.cs index 7d776466..dea95a1e 100644 --- a/Source/ZoomNet/Resources/IWebinars.cs +++ b/Source/ZoomNet/Resources/IWebinars.cs @@ -24,8 +24,21 @@ public interface IWebinars /// /// An array of webinars. /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] Task> GetAllAsync(string userId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default); + /// + /// Retrieve all webinars for a user. + /// + /// The user Id or email address. + /// The number of records returned within a single API call. + /// The paging token. + /// The cancellation token. + /// + /// An array of webinars. + /// + Task> GetAllAsync(string userId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + /// /// Creates a scheduled webinar for a user. /// @@ -161,8 +174,23 @@ public interface IWebinars /// /// An array of . /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] Task> GetRegistrantsAsync(long webinarId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default); + /// + /// List the users that have registered for a webinar. + /// + /// The webinar ID. + /// The registrant status. + /// The webinar occurrence id. + /// The number of records returned within a single API call. + /// The paging token. + /// The cancellation token. + /// + /// An array of . + /// + Task> GetRegistrantsAsync(long webinarId, RegistrantStatus status, string occurrenceId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + /// /// Get details on a specific user who registered for a webinar. /// diff --git a/Source/ZoomNet/Resources/Webinars.cs b/Source/ZoomNet/Resources/Webinars.cs index 8caba57e..022f621d 100644 --- a/Source/ZoomNet/Resources/Webinars.cs +++ b/Source/ZoomNet/Resources/Webinars.cs @@ -41,6 +41,7 @@ internal Webinars(Pathoschild.Http.Client.IClient client) /// /// An array of . /// + [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] public Task> GetAllAsync(string userId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -56,6 +57,31 @@ public Task> GetAllAsync(string userId, int recordsPe .AsPaginatedResponse("webinars", new WebinarConverter()); } + /// + /// Retrieve all webinars for a user. + /// + /// The user Id or email address. + /// The number of records returned within a single API call. + /// The paging token. + /// The cancellation token. + /// + /// An array of . + /// + public Task> GetAllAsync(string userId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + if (recordsPerPage < 1 || recordsPerPage > 300) + { + throw new ArgumentOutOfRangeException(nameof(recordsPerPage), "Records per page must be between 1 and 300"); + } + + return _client + .GetAsync($"users/{userId}/webinars") + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("webinars", new WebinarConverter()); + } + /// /// Creates a scheduled webinar for a user. /// @@ -292,6 +318,7 @@ public Task RemoveAllPanelistsAsync(long webinarId, CancellationToken cancellati /// /// 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 occurrenceId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) @@ -309,6 +336,35 @@ public Task> GetRegistrantsAsync(long webinarId, R .AsPaginatedResponse("registrants"); } + /// + /// List the users that have registered for a webinar. + /// + /// The webinar ID. + /// The registrant status. + /// 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 occurrenceId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + if (recordsPerPage < 1 || recordsPerPage > 300) + { + throw new ArgumentOutOfRangeException(nameof(recordsPerPage), "Records per page must be between 1 and 300"); + } + + return _client + .GetAsync($"webinars/{webinarId}/registrants") + .WithArgument("status", JToken.Parse(JsonConvert.SerializeObject(status)).ToString()) + .WithArgument("occurrence_id", occurrenceId) + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("registrants"); + } + /// /// Get details on a specific user who registered for a webinar. /// From e3c186891b031ec469dd6fc6c0bcc137fb38402a Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 30 Aug 2020 11:19:07 -0400 Subject: [PATCH 6/9] (GH-46) Update integration tests to use the new overloads that accept a paging token instead of a page number --- Source/ZoomNet.IntegrationTests/Tests/Meetings.cs | 6 +++--- Source/ZoomNet.IntegrationTests/Tests/Webinars.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs index 7a2f6f01..8763f6a8 100644 --- a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs +++ b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs @@ -17,13 +17,13 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca await log.WriteLineAsync("\n***** MEETINGS *****\n").ConfigureAwait(false); // GET ALL THE MEETINGS - var paginatedScheduledMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Scheduled, 100, 1, cancellationToken).ConfigureAwait(false); + var paginatedScheduledMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Scheduled, 100, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"There are {paginatedScheduledMeetings.TotalRecords} scheduled meetings").ConfigureAwait(false); - var paginatedLiveMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Live, 100, 1, cancellationToken).ConfigureAwait(false); + var paginatedLiveMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Live, 100, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"There are {paginatedLiveMeetings.TotalRecords} live meetings").ConfigureAwait(false); - var paginatedUpcomingMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Upcoming, 100, 1, cancellationToken).ConfigureAwait(false); + var paginatedUpcomingMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Upcoming, 100, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"There are {paginatedUpcomingMeetings.TotalRecords} upcoming meetings").ConfigureAwait(false); // CLEANUP PREVIOUS INTEGRATION TESTS THAT MIGHT HAVE BEEN INTERRUPTED BEFORE THEY HAD TIME TO CLEANUP AFTER THEMSELVES diff --git a/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs b/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs index 6e4b0ecc..3b0eaf1c 100644 --- a/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs +++ b/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs @@ -17,7 +17,7 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca await log.WriteLineAsync("\n***** WEBINARS *****\n").ConfigureAwait(false); // GET ALL THE WEBINARS - var paginatedWebinars = await client.Webinars.GetAllAsync(userId, 30, 1, cancellationToken).ConfigureAwait(false); + var paginatedWebinars = await client.Webinars.GetAllAsync(userId, 30, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"There are {paginatedWebinars.TotalRecords} webinars for user {userId}").ConfigureAwait(false); // CLEANUP PREVIOUS INTEGRATION TESTS THAT MIGHT HAVE BEEN INTERRUPTED BEFORE THEY HAD TIME TO CLEANUP AFTER THEMSELVES From eca1e4de3599fb21a8b613a8156c57a7a6097ed8 Mon Sep 17 00:00:00 2001 From: Mordechai Zuber Date: Sun, 6 Sep 2020 23:33:57 +0300 Subject: [PATCH 7/9] Initial work on Dashboards client + ListMeetings endpoint (#48) * Initial work on Dashboards client + ListMeetings endpoint * Fix style errors * We don't actually want to use the MeetingConverter here * IDashboards.GetMeetingAsync * IDashboards.GetMeetingParticipantsAsync * Dedicated enum for DashboardMeetingType * IDashboards.GetMeetingParticipantQOSAsync * IDashboards.GetAllMeetingParticipantQOSAsync * IDashboards.GetAllParticipantSharingDetailsAsync * IDashboard.GetAllWebinarsAsync * Rename * IDashboards.GetWebinarAsync * IDashboards.GetWebinarParticipantsAsync * IDashboards.GetWebinarParticipantQosAsync, GetAllWebinarParticipantQosAsync, GetAllWebinarParticipantSharingDetailsAsync * IDashboards.GetAllZoomRoomsAsync * IDashboards.GetRoomDetailsAsync * IDashboards.GetCrcPortUsageAsync * IDashboards.GetImMetricsAsync * IDashboards.GetClientFeedbackMetricsAsync * IDashboards.GetIssuesOfZoomRoomsAsync * IDashboards.GetZoomRoomsWithIssuesAsync * IDashboards.GetIssuesOfZoomRoomAsync * IDashboards.GetZoomMeetingsClientFeedbackAsync * IDashboards.GetClientMeetingSatisfactionMetrics * PR Feedback * Create `IssueType` enum --- Source/ZoomNet/Extensions/Internal.cs | 42 ++ Source/ZoomNet/IZoomClient.cs | 5 + Source/ZoomNet/Models/ClientFeedbackDetail.cs | 39 ++ .../ZoomNet/Models/ClientFeedbackMetrics.cs | 36 + .../Models/ClientFeedbackMetricsReport.cs | 39 ++ .../Models/ClientSatisfactionMetrics.cs | 47 ++ .../Models/ClientSatisfactionReport.cs | 39 ++ Source/ZoomNet/Models/CrcPortMetrics.cs | 29 + Source/ZoomNet/Models/CrcPortsHourUsage.cs | 32 + Source/ZoomNet/Models/CrcPortsUsage.cs | 25 + .../ZoomNet/Models/DashboardMeetingMetrics.cs | 19 + ...DashboardMeetingMetricsPaginationObject.cs | 59 ++ .../Models/DashboardMeetingParticipant.cs | 28 + .../Models/DashboardMeetingParticipantQos.cs | 129 ++++ Source/ZoomNet/Models/DashboardMeetingType.cs | 33 + Source/ZoomNet/Models/DashboardMetricsBase.cs | 173 +++++ Source/ZoomNet/Models/DashboardParticipant.cs | 229 +++++++ .../ZoomNet/Models/DashboardParticipantQos.cs | 138 ++++ Source/ZoomNet/Models/ImMetric.cs | 143 ++++ Source/ZoomNet/Models/IssueType.cs | 175 +++++ Source/ZoomNet/Models/IssuesOfZoomRooms.cs | 46 ++ .../ZoomNet/Models/IssuesOfZoomRoomsReport.cs | 39 ++ Source/ZoomNet/Models/MeetingListType.cs | 4 +- .../PaginatedResponseWithTokenAndDateRange.cs | 24 + .../Models/ParticipantSharingDetails.cs | 46 ++ .../Models/QualityOfService/CpuUsage.cs | 46 ++ .../PacketQualityOfServiceMetrics.cs | 55 ++ .../VideoQualityOfServiceMetrics.cs | 28 + .../Models/SharingAndRecordingDetail.cs | 37 + Source/ZoomNet/Models/ZoomRoom.cs | 154 +++++ Source/ZoomNet/Models/ZoomRoomIssueDetails.cs | 47 ++ Source/ZoomNet/Models/ZoomRoomWithIssues.cs | 31 + .../Models/ZoomRoomWithIssuesReport.cs | 39 ++ Source/ZoomNet/Resources/Dashboards.cs | 630 ++++++++++++++++++ Source/ZoomNet/Resources/IDashboards.cs | 359 ++++++++++ Source/ZoomNet/ZoomClient.cs | 6 + 36 files changed, 3048 insertions(+), 2 deletions(-) create mode 100644 Source/ZoomNet/Models/ClientFeedbackDetail.cs create mode 100644 Source/ZoomNet/Models/ClientFeedbackMetrics.cs create mode 100644 Source/ZoomNet/Models/ClientFeedbackMetricsReport.cs create mode 100644 Source/ZoomNet/Models/ClientSatisfactionMetrics.cs create mode 100644 Source/ZoomNet/Models/ClientSatisfactionReport.cs create mode 100644 Source/ZoomNet/Models/CrcPortMetrics.cs create mode 100644 Source/ZoomNet/Models/CrcPortsHourUsage.cs create mode 100644 Source/ZoomNet/Models/CrcPortsUsage.cs create mode 100644 Source/ZoomNet/Models/DashboardMeetingMetrics.cs create mode 100644 Source/ZoomNet/Models/DashboardMeetingMetricsPaginationObject.cs create mode 100644 Source/ZoomNet/Models/DashboardMeetingParticipant.cs create mode 100644 Source/ZoomNet/Models/DashboardMeetingParticipantQos.cs create mode 100644 Source/ZoomNet/Models/DashboardMeetingType.cs create mode 100644 Source/ZoomNet/Models/DashboardMetricsBase.cs create mode 100644 Source/ZoomNet/Models/DashboardParticipant.cs create mode 100644 Source/ZoomNet/Models/DashboardParticipantQos.cs create mode 100644 Source/ZoomNet/Models/ImMetric.cs create mode 100644 Source/ZoomNet/Models/IssueType.cs create mode 100644 Source/ZoomNet/Models/IssuesOfZoomRooms.cs create mode 100644 Source/ZoomNet/Models/IssuesOfZoomRoomsReport.cs create mode 100644 Source/ZoomNet/Models/PaginatedResponseWithTokenAndDateRange.cs create mode 100644 Source/ZoomNet/Models/ParticipantSharingDetails.cs create mode 100644 Source/ZoomNet/Models/QualityOfService/CpuUsage.cs create mode 100644 Source/ZoomNet/Models/QualityOfService/PacketQualityOfServiceMetrics.cs create mode 100644 Source/ZoomNet/Models/QualityOfService/VideoQualityOfServiceMetrics.cs create mode 100644 Source/ZoomNet/Models/SharingAndRecordingDetail.cs create mode 100644 Source/ZoomNet/Models/ZoomRoom.cs create mode 100644 Source/ZoomNet/Models/ZoomRoomIssueDetails.cs create mode 100644 Source/ZoomNet/Models/ZoomRoomWithIssues.cs create mode 100644 Source/ZoomNet/Models/ZoomRoomWithIssuesReport.cs create mode 100644 Source/ZoomNet/Resources/Dashboards.cs create mode 100644 Source/ZoomNet/Resources/IDashboards.cs diff --git a/Source/ZoomNet/Extensions/Internal.cs b/Source/ZoomNet/Extensions/Internal.cs index 126a9d0d..1c1eb17f 100644 --- a/Source/ZoomNet/Extensions/Internal.cs +++ b/Source/ZoomNet/Extensions/Internal.cs @@ -3,6 +3,7 @@ using Pathoschild.Http.Client; using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; @@ -238,6 +239,19 @@ internal static async Task> AsPaginatedResponseWit return await response.Content.AsPaginatedResponseWithToken(propertyName, jsonConverter).ConfigureAwait(false); } + /// Asynchronously retrieve the JSON encoded response body and convert it to a 'PaginatedResponseWithToken' object. + /// The response model to deserialize into. + /// The request. + /// The name of the JSON property (or null if not applicable) where the desired data is stored. + /// Converter that will be used during deserialization. + /// Returns the paginated response. + /// An error occurred processing the response. + internal static async Task> AsPaginatedResponseWithTokenAndDateRange(this IRequest request, string propertyName, JsonConverter jsonConverter = null) + { + var response = await request.AsMessage().ConfigureAwait(false); + return await response.Content.AsPaginatedResponseWithTokenAndDateRange(propertyName, jsonConverter).ConfigureAwait(false); + } + /// Set the body content of the HTTP request. /// The type of object to serialize into a JSON string. /// The request. @@ -621,5 +635,33 @@ private static async Task> AsPaginatedResponseWith return result; } + + /// Asynchronously retrieve the JSON encoded content and converts it to a 'PaginatedResponseWithToken' object. + /// The response model to deserialize into. + /// The content. + /// The name of the JSON property (or null if not applicable) where the desired data is stored. + /// Converter that will be used during deserialization. + /// Returns the response body, or null if the response has no body. + /// An error occurred processing the response. + private static async Task> AsPaginatedResponseWithTokenAndDateRange(this HttpContent httpContent, string propertyName, JsonConverter jsonConverter = null) + { + var responseContent = await httpContent.ReadAsStringAsync(null).ConfigureAwait(false); + var jObject = JObject.Parse(responseContent); + + var serializer = new JsonSerializer(); + if (jsonConverter != null) serializer.Converters.Add(jsonConverter); + + var result = new PaginatedResponseWithTokenAndDateRange() + { + From = DateTime.ParseExact(jObject.Property("from").Value.ToString(), "yyyy-MM-dd", CultureInfo.InvariantCulture), + To = DateTime.ParseExact(jObject.Property("to").Value.ToString(), "yyyy-MM-dd", CultureInfo.InvariantCulture), + NextPageToken = jObject.Property("next_page_token").Value.ToString(), + PageSize = jObject.Property("page_size").Value.ToObject(), + Records = jObject.Property(propertyName).Value.ToObject(serializer), + TotalRecords = jObject.Property("total_records").Value.ToObject() + }; + + return result; + } } } diff --git a/Source/ZoomNet/IZoomClient.cs b/Source/ZoomNet/IZoomClient.cs index 5f7e40ed..287efcc9 100644 --- a/Source/ZoomNet/IZoomClient.cs +++ b/Source/ZoomNet/IZoomClient.cs @@ -46,5 +46,10 @@ public interface IZoomClient /// The webinars resource. /// IWebinars Webinars { get; } + + /// + /// Gets the resource which allows you to view metrics. + /// + IDashboards Dashboards { get; } } } diff --git a/Source/ZoomNet/Models/ClientFeedbackDetail.cs b/Source/ZoomNet/Models/ClientFeedbackDetail.cs new file mode 100644 index 00000000..a89c1b49 --- /dev/null +++ b/Source/ZoomNet/Models/ClientFeedbackDetail.cs @@ -0,0 +1,39 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Details of participant feedback on Zoom meetings client. + /// + public class ClientFeedbackDetail + { + /// + /// Gets or sets the participant's name. + /// + /// The participant's name. + [JsonProperty(PropertyName = "participant_name")] + public string Name { get; set; } + + /// + /// Gets or sets the meeting id. + /// + /// The meeting id. + [JsonProperty(PropertyName = "meeting_id")] + public string MeetingId { get; set; } + + /// + /// Gets or sets the time the feedback was submitted by the participant. + /// + /// The time the feedback was submitted by the participant. + [JsonProperty(PropertyName = "time")] + public DateTime Time { get; set; } + + /// + /// Gets or sets the participant's email address. + /// + /// The participants email. + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ClientFeedbackMetrics.cs b/Source/ZoomNet/Models/ClientFeedbackMetrics.cs new file mode 100644 index 00000000..9f5a60be --- /dev/null +++ b/Source/ZoomNet/Models/ClientFeedbackMetrics.cs @@ -0,0 +1,36 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZoomNet.Models +{ + /// + /// Metrics for a feedback item. + /// + public class ClientFeedbackMetrics + { + /// + /// Gets or sets the feedback id. + /// + /// The feedback id. + [JsonProperty(PropertyName = "feedback_id")] + public string FeedbackId { get; set; } + + /// + /// Gets or sets the feedback name. + /// + /// The feedback name. + [JsonProperty(PropertyName = "feedback_name")] + public string FeebackName { get; set; } + + /// + /// Gets or sets the participant count. + /// + /// The number of participants that upvoted the feedback. + [JsonProperty(PropertyName = "participants_count")] + public int ParticipantsCount { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ClientFeedbackMetricsReport.cs b/Source/ZoomNet/Models/ClientFeedbackMetricsReport.cs new file mode 100644 index 00000000..89a5e849 --- /dev/null +++ b/Source/ZoomNet/Models/ClientFeedbackMetricsReport.cs @@ -0,0 +1,39 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Report with client feedback metrics for a given range. + /// + public class ClientFeedbackMetricsReport + { + /// + /// Gets or sets the start date for this report. + /// + /// The start date for this report. + [JsonProperty(PropertyName = "from")] + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for this report. + /// + /// The end date for this report. + [JsonProperty(PropertyName = "to")] + public DateTime To { get; set; } + + /// + /// Gets or sets the number of all records available across pages. + /// + /// The number of all records available across pages. + [JsonProperty(PropertyName = "total_records")] + public int TotalRecords { get; set; } + + /// + /// Gets or sets the collection of client feedback metrics. + /// + /// The collection of client feedback metrics. + [JsonProperty(PropertyName = "client_feedbacks")] + public ClientFeedbackMetrics[] ClientFeedbacks { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ClientSatisfactionMetrics.cs b/Source/ZoomNet/Models/ClientSatisfactionMetrics.cs new file mode 100644 index 00000000..abd2f632 --- /dev/null +++ b/Source/ZoomNet/Models/ClientSatisfactionMetrics.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Metrics for a client satisfaction item. + /// + public class ClientSatisfactionMetrics + { + /// + /// Gets or sets the date of the report. + /// + /// The date of the report. + [JsonProperty(PropertyName = "date")] + public DateTime Date { get; set; } + + /// + /// Gets or sets the satisfaction percentage.
+ /// The satisfaction percentage is calculated as `(good_count + none_count)` / `total_count`. + ///
+ /// The satisfaction percentage. + [JsonProperty(PropertyName = "satisfaction_percent")] + public long SatisfactionPercent { get; set; } + + /// + /// Gets or sets the total number of "thumbs up" received for this meeting. + /// + /// The total number of "thumbs up" received for this meeting. + [JsonProperty(PropertyName = "good_count")] + public int GoodCount { get; set; } + + /// + /// Gets or sets the total number of "thumbs down" received for this meeting. + /// + /// The total number of "thumbs down" received for this meeting. + [JsonProperty(PropertyName = "not_good_count")] + public int NotGoodCount { get; set; } + + /// + /// Gets or sets the total number of attendees who didn't submit any response (neither thumbs up nor thumbs down). + /// + /// The total number of attendees who didn't submit any response (neither thumbs up nor thumbs down). + [JsonProperty(PropertyName = "none_count")] + public int NoneCount { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ClientSatisfactionReport.cs b/Source/ZoomNet/Models/ClientSatisfactionReport.cs new file mode 100644 index 00000000..f393ade8 --- /dev/null +++ b/Source/ZoomNet/Models/ClientSatisfactionReport.cs @@ -0,0 +1,39 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Report on client statisfaction feedback. + /// + public class ClientSatisfactionReport + { + /// + /// Gets or sets the start date for this report. + /// + /// The start date for this report. + [JsonProperty(PropertyName = "from")] + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for this report. + /// + /// The end date for this report. + [JsonProperty(PropertyName = "to")] + public DateTime To { get; set; } + + /// + /// Gets or sets the number of all records available across pages. + /// + /// The number of all records available across pages. + [JsonProperty(PropertyName = "total_records")] + public int TotalRecords { get; set; } + + /// + /// Gets or sets the collection of client feedback metrics. + /// + /// The collection of client feedback metrics. + [JsonProperty(PropertyName = "client_satisfaction")] + public ClientSatisfactionMetrics[] ClientSatisfactions { get; set; } + } +} diff --git a/Source/ZoomNet/Models/CrcPortMetrics.cs b/Source/ZoomNet/Models/CrcPortMetrics.cs new file mode 100644 index 00000000..1b16037a --- /dev/null +++ b/Source/ZoomNet/Models/CrcPortMetrics.cs @@ -0,0 +1,29 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZoomNet.Models +{ + /// + /// Metrics for the CRC port usage. + /// + public class CrcPortMetrics + { + /// + /// Gets or sets the start date for this report. + /// + /// The start date for this report. + [JsonProperty(PropertyName = "from")] + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for this report. + /// + /// The end date for this report. + [JsonProperty(PropertyName = "to")] + public DateTime To { get; set; } + } +} diff --git a/Source/ZoomNet/Models/CrcPortsHourUsage.cs b/Source/ZoomNet/Models/CrcPortsHourUsage.cs new file mode 100644 index 00000000..83d2cc02 --- /dev/null +++ b/Source/ZoomNet/Models/CrcPortsHourUsage.cs @@ -0,0 +1,32 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Usage of the CRC for the hour. + /// + public class CrcPortsHourUsage + { + /// + /// Gets or sets the hour that the usage is for, in 24h format. + /// + /// The hour in the day, during which the CRC was used. For example if the CRC was used at 11 pm, the value of this field will be 23. + [JsonProperty(PropertyName = "hour")] + public int Hour { get; set; } + + /// + /// Gets or sets the maximum usage for the hour. + /// + /// The maximum number of concurrent ports that are being used in that hour. + [JsonProperty(PropertyName = "max_usage")] + + public int MaxUsage { get; set; } + + /// + /// Gets or sets the total usage for the hour. + /// + /// The total number of H.323/SIP connections in that hour. + [JsonProperty(PropertyName = "total_usage")] + public int TotalUsage { get; set; } + } +} diff --git a/Source/ZoomNet/Models/CrcPortsUsage.cs b/Source/ZoomNet/Models/CrcPortsUsage.cs new file mode 100644 index 00000000..4055c86c --- /dev/null +++ b/Source/ZoomNet/Models/CrcPortsUsage.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Hourly data of CRC usage. + /// + public class CrcPortsUsage + { + /// + /// Gets or sets the date and time of the port usage. + /// + /// The date and time of the port usage. + [JsonProperty(PropertyName = "date_time")] + public DateTime DateTime { get; set; } + + /// + /// Gets or sets the hourly metrics for the port usage. + /// + /// The hourly port usage. + [JsonProperty(PropertyName = "crc_ports_hour_usage")] + public CrcPortsHourUsage[] HourlyUsage { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardMeetingMetrics.cs b/Source/ZoomNet/Models/DashboardMeetingMetrics.cs new file mode 100644 index 00000000..9d7e1451 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMeetingMetrics.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Metrics for a meeting. + /// + public class DashboardMeetingMetrics : DashboardMetricsBase + { + /// + /// Gets or sets the number of Zoom Room participants in the meeting. + /// + /// + /// The number of Zoom Room participants in the meeting. + /// + [JsonProperty(PropertyName = "in_room_participants")] + public int InRoomParticipants { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardMeetingMetricsPaginationObject.cs b/Source/ZoomNet/Models/DashboardMeetingMetricsPaginationObject.cs new file mode 100644 index 00000000..caeb42e7 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMeetingMetricsPaginationObject.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; +using ZoomNet.Resources; + +namespace ZoomNet.Models +{ + /// + /// Pagination Object for meeting metrics returned as deep nested properties in some endpoints. + /// + public class DashboardMeetingMetricsPaginationObject + { + /// + /// Gets or sets the start date for the report. + /// + /// Start date for this report in 'yyyy-mm-dd' format. + public string From { get; set; } + + /// + /// Gets or sets the end date for the report. + /// + /// End date for this report in 'yyyy-mm-dd' format. + public string To { get; set; } + + /// + /// Gets or sets the number of items returned on this page. + /// + /// The number of items returned on this page. + [JsonProperty(PropertyName = "page_count")] + public int PageCount { get; set; } + + /// + /// Gets or sets the number of records returned within a single API call. + /// + /// The number of records returned within a single API call. + [JsonProperty(PropertyName = "page_size")] + public int PageSize { get; set; } + + /// + /// Gets or sets the number of all records available across pages. + /// + /// The number of all records available across pages. + [JsonProperty(PropertyName = "total_records")] + public int? TotalRecords { get; set; } + + /// + /// Gets or sets the token to retrieve the next page. + /// + /// The page token. + /// This token expires after 15 minutes. + [JsonProperty(PropertyName = "next_page_token")] + public string NextPageToken { get; set; } + + /// + /// Gets or sets the metrics for the meetings. + /// + /// The metrics for the meetings. + [JsonProperty(PropertyName = "meetings")] + public DashboardMeetingMetrics[] Records { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardMeetingParticipant.cs b/Source/ZoomNet/Models/DashboardMeetingParticipant.cs new file mode 100644 index 00000000..3de605a1 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMeetingParticipant.cs @@ -0,0 +1,28 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Metrics of a meeting participant. + /// + public class DashboardMeetingParticipant : DashboardParticipant + { + /// + /// Gets or sets the type of camera used by participant during the meeting. + /// + /// + /// The type of camera used by participant during the meeting. + /// + [JsonProperty(PropertyName = "camera")] + public string Camera { get; set; } + + /// + /// Gets or sets the number of participants who joined via Zoom Room. + /// + /// + /// The number of participants who joined via Zoom Room. + /// + [JsonProperty(PropertyName = "in_room_participants")] + public int InRoomParticipants { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardMeetingParticipantQos.cs b/Source/ZoomNet/Models/DashboardMeetingParticipantQos.cs new file mode 100644 index 00000000..5bec2a5b --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMeetingParticipantQos.cs @@ -0,0 +1,129 @@ +using Newtonsoft.Json; +using System; +using System.Collections; + +namespace ZoomNet.Models +{ + /// + /// Metrics of the quality of service experienced by a meeting participant. + /// + public class DashboardMeetingParticipantQos + { + /// + /// Gets or sets participant ID. + /// + /// + /// The participant id. + /// + [JsonProperty(PropertyName = "user_id")] + public string UserId { get; set; } + + /// + /// Gets or sets participant display name. + /// + /// + /// The participant display name. + /// + [JsonProperty(PropertyName = "user_name")] + public string UserName { get; set; } + + /// + /// Gets or sets the type of device using which the participant joined the meeting. + /// + /// + /// The type of device using which the participant joined the meeting. + /// + [JsonProperty(PropertyName = "device")] + public string Device { get; set; } + + /// + /// Gets or sets participant's IP address. + /// + /// + /// The participant’s IP address. + /// + [JsonProperty(PropertyName = "ip_address")] + public string IpAddress { get; set; } + + /// + /// Gets or sets participant's location. + /// + /// + /// The participant’s location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the time at which participant joined the meeting. + /// + /// + /// The time at which participant joined the meeting. + /// + [JsonProperty(PropertyName = "join_time")] + public DateTime JoinTime { get; set; } + + /// + /// Gets or sets the time at which a participant left the meeting. + /// + /// + /// The time at which a participant left the meeting. For live meetings this field will only be returned if a participant has left the ongoing meeting. + /// + [JsonProperty(PropertyName = "leave_time", NullValueHandling = NullValueHandling.Ignore)] + public DateTime? LeaveTime { get; set; } + + /// + /// Gets or sets the name of participant’s PC. + /// + /// + /// The name of participant’s PC. + /// + [JsonProperty(PropertyName = "pc_name")] + public string PcName { get; set; } + + /// + /// Gets or sets the participant’s PC domain. + /// + /// + /// The participant’s PC domain. + /// + [JsonProperty(PropertyName = "domain")] + public string Domain { get; set; } + + /// + /// Gets or sets the participant’s MAC address. + /// + /// + /// The participant’s MAC address. + /// + [JsonProperty(PropertyName = "mac_addr")] + public string MacAddress { get; set; } + + /// + /// Gets or sets the participant’s hard disk ID. + /// + /// + /// The participant’s hard disk ID. + /// + [JsonProperty(PropertyName = "harddisk_id")] + public string HardDiskId { get; set; } + + /// + /// Gets or sets the participant’s Zoom Client version. + /// + /// + /// The participant’s Zoom Client version. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or sets the collection of quality of service data. + /// + /// + /// The quality of service data available for the meeting. + /// + [JsonProperty(PropertyName = "user_qos")] + public DashboardParticipantQos[] QualityOfServiceData { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardMeetingType.cs b/Source/ZoomNet/Models/DashboardMeetingType.cs new file mode 100644 index 00000000..3b761461 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMeetingType.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace ZoomNet.Models +{ + /// + /// Enumeration to indicate the type of meeting metrics are being returned for. + /// + public enum DashboardMeetingType + { + /// + /// Live. + /// + [EnumMember(Value = "live")] + Live, + + /// + /// Past + /// + [EnumMember(Value = "past")] + Past, + + /// + /// PastOne + /// + [EnumMember(Value = "pastOne")] + PastOne + } +} diff --git a/Source/ZoomNet/Models/DashboardMetricsBase.cs b/Source/ZoomNet/Models/DashboardMetricsBase.cs new file mode 100644 index 00000000..3c9ce7d5 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardMetricsBase.cs @@ -0,0 +1,173 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Base model for metrics returned by Dashboards client for meetings and webinars. + /// + public class DashboardMetricsBase + { + /// + /// Gets or sets the unique id. + /// + /// + /// The unique id. + /// + [JsonProperty(PropertyName = "uuid")] + public string Uuid { get; set; } + + /// + /// Gets or sets the meeting id, also known as the meeting number. + /// + /// + /// The id. + /// + [JsonProperty(PropertyName = "id")] + public long Id { get; set; } + + /// + /// Gets or sets the topic of the meeting. + /// + /// + /// The topic. + /// + [JsonProperty(PropertyName = "topic")] + public string Topic { get; set; } + + /// + /// Gets or sets the display name of the meeting host. + /// + /// + /// The host display name. + /// + [JsonProperty(PropertyName = "host")] + public string Host { get; set; } + + /// + /// Gets or sets the email address of the meeting host. + /// + /// + /// The host email address. + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + /// + /// Gets or sets the license type of the user. + /// + /// + /// The users license type. + /// + [JsonProperty(PropertyName = "user_type")] + public string UserType { get; set; } + + /// + /// Gets or sets the start time of the meeting. + /// + /// + /// The meeting start time. + /// + [JsonProperty(PropertyName = "start_time")] + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the end time of the meeting. + /// + /// + /// The meeting end time. + /// + [JsonProperty(PropertyName = "end_time")] + public DateTime EndTime { get; set; } + + /// + /// Gets or sets the meeting duration. + /// + /// + /// The meeting duration. + /// + [JsonProperty(PropertyName = "duration")] + public string Duration { get; set; } + + /// + /// Gets or sets the meeting participant count. + /// + /// + /// The meeting participant count. + /// + [JsonProperty(PropertyName = "participants")] + public int ParticipantCount { get; set; } + + /// + /// Gets or sets a value indicating whether or not the PSTN was used in the meeting. + /// + /// + /// Indication whether or not the PSTN was used in the meeting. + /// + [JsonProperty(PropertyName = "has_pstn")] + public bool HasPstn { get; set; } + + /// + /// Gets or sets a value indicating whether or not VoIP was used in the meeting. + /// + /// + /// Indication whether or not VoIP was used in the meeting. + /// + [JsonProperty(PropertyName = "has_voip")] + public bool HasVoip { get; set; } + + /// + /// Gets or sets a value indicating whether or not 3rd party audio was used in the meeting. + /// + /// + /// Indication whether or not 3rd Party audio was used. + /// + [JsonProperty(PropertyName = "has_3rd_party_audio")] + public bool Has3RdPartyAudio { get; set; } + + /// + /// Gets or sets a value indicating whether or not video was used in the meeting. + /// + /// + /// Indication whether or not video was used in the meeting. + /// + [JsonProperty(PropertyName = "has_video")] + public bool HasVideo { get; set; } + + /// + /// Gets or sets a value indicating whether or not screenshare feature was used in the meeting. + /// + /// + /// Indication whether or not screenshare feature was used in the meeting. + /// + [JsonProperty(PropertyName = "has_screen_share")] + public bool HasScreenShare { get; set; } + + /// + /// Gets or sets a value indicating whether or not the recording feature was used in the meeting. + /// + /// + /// Indication whether or not the recording feature was used in the meeting. + /// + [JsonProperty(PropertyName = "has_recording")] + public bool HasRecording { get; set; } + + /// + /// Gets or sets a value indicating whether or not someone joined the meeting using SIP. + /// + /// + /// Indication whether or not someone joined the meeting using SIP. + /// + [JsonProperty(PropertyName = "has_sip")] + public bool HasSip { get; set; } + + /// + /// Gets or sets the department of the host. + /// + /// + /// The department of the host. + /// + [JsonProperty(PropertyName = "dept")] + public string Department { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardParticipant.cs b/Source/ZoomNet/Models/DashboardParticipant.cs new file mode 100644 index 00000000..faae2269 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardParticipant.cs @@ -0,0 +1,229 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Metrics of a participant. + /// + public class DashboardParticipant + { + /// + /// Gets or sets the Universally unique identifier of the participant. + /// + /// + /// The Universally unique identifier of the participant.
+ /// It is the same as the User ID of the participant if the participant joins the meeting by logging into Zoom
+ /// If the participant joins the meeting without logging in the value of this field will be blank. + ///
+ [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the participant ID. + /// + /// + /// The participant ID. + /// + [JsonProperty(PropertyName = "user_id")] + public string UserId { get; set; } + + /// + /// Gets or sets the participant display name. + /// + /// + /// The participant display name. + /// + [JsonProperty(PropertyName = "user_name")] + public string UserName { get; set; } + + /// + /// Gets or sets the type of device using which the participant joined the meeting. + /// + /// + /// The type of device using which the participant joined the meeting. + /// + [JsonProperty(PropertyName = "device")] + public string Device { get; set; } + + /// + /// Gets or sets the participant’s IP address. + /// + /// + /// The participant’s IP address. + /// + [JsonProperty(PropertyName = "ip_address")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the participant’s location. + /// + /// + /// The participant’s location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the participant’s network type. + /// + /// + /// The participant’s network type. + /// + [JsonProperty(PropertyName = "network_type")] + public string NetworkType { get; set; } + + /// + /// Gets or sets the type of microphone that participant used during the meeting. + /// + /// + /// The type of microphone that participant used during the meeting. + /// + [JsonProperty(PropertyName = "microphone")] + public string Microphone { get; set; } + + /// + /// Gets or sets the type of speaker participant used during the meeting. + /// + /// + /// The type of speaker participant used during the meeting. + /// + [JsonProperty(PropertyName = "speaker")] + public string Speaker { get; set; } + + /// + /// Gets or sets the data center where participant’s meeting data is stored. + /// + /// + /// The data center where participant’s meeting data is stored. + /// + [JsonProperty(PropertyName = "data_center")] + public string DataCenter { get; set; } + + /// + /// Gets or sets the participant connection type. + /// + /// + /// The participant connection type. + /// + [JsonProperty(PropertyName = "connection_type")] + public string ConnectionType { get; set; } + + /// + /// Gets or sets the time at which participant joined the meeting. + /// + /// + /// The time at which participant joined the meeting. + /// + [JsonProperty(PropertyName = "join_time")] + public DateTime JoinTime { get; set; } + + /// + /// Gets or sets the time at which a participant left the meeting. + /// + /// + /// The time at which a participant left the meeting. For live meetings this field will only be returned if a participant has left the ongoing meeting. + /// + [JsonProperty(PropertyName = "leave_time", NullValueHandling = NullValueHandling.Ignore)] + public DateTime? LeaveTime { get; set; } + + /// + /// Gets or sets a value indicating whether or not a user selected to share an iPhone/iPad application during the screen-share. + /// + /// + /// Indicates whether or not a user selected to share an iPhone/iPad application during the screen-share. + /// + [JsonProperty(PropertyName = "share_application")] + public bool ShareApplication { get; set; } + + /// + /// Gets or sets a value indicating whether or not a user selected to share their desktop during the screen-share. + /// + /// + /// Indicates whether or not a user selected to share their desktop during the screen-share. + /// + [JsonProperty(PropertyName = "share_desktop")] + public bool ShareDesktop { get; set; } + + /// + /// Gets or sets a value indicating whether or not a user selected to share their white-board during the screen-share. + /// + /// + /// Indicates whether or not a user selected to share their white-board during the screen-share. + /// + [JsonProperty(PropertyName = "share_whiteboard")] + public bool ShareWhiteboard { get; set; } + + /// + /// Gets or sets a value indicating whether or not recording was used during the meeting. + /// + /// + /// Indicates whether or not recording was used during the meeting. + /// + [JsonProperty(PropertyName = "recording")] + public bool Recording { get; set; } + + /// + /// Gets or sets the name of participant’s PC. + /// + /// + /// The name of participant’s PC. + /// + [JsonProperty(PropertyName = "pc_name")] + public string PcName { get; set; } + + /// + /// Gets or sets the participant’s PC domain. + /// + /// + /// The participant’s PC domain. + /// + [JsonProperty(PropertyName = "domain")] + public string Domain { get; set; } + + /// + /// Gets or sets the participant’s MAC address. + /// + /// + /// The participant’s MAC address. + /// + [JsonProperty(PropertyName = "mac_addr")] + public string MacAddress { get; set; } + + /// + /// Gets or sets the participant’s hard disk ID. + /// + /// + /// The participant’s hard disk ID. + /// + [JsonProperty(PropertyName = "harddisk_id")] + public string HardDiskId { get; set; } + + /// + /// Gets or sets the participant’s Zoom Client version. + /// + /// + /// The participant’s Zoom Client version. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or sets the Possible reasons for why participant left the meeting. + /// + /// + /// The Possible reasons for why participant left the meeting. + /// + [JsonProperty(PropertyName = "leave_reason")] + public string LeaveReason { get; set; } + + /// + /// Gets or sets the Email address of the participant. + /// + /// + /// The Email address of the participant. + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + } +} diff --git a/Source/ZoomNet/Models/DashboardParticipantQos.cs b/Source/ZoomNet/Models/DashboardParticipantQos.cs new file mode 100644 index 00000000..095f9160 --- /dev/null +++ b/Source/ZoomNet/Models/DashboardParticipantQos.cs @@ -0,0 +1,138 @@ +using Newtonsoft.Json; +using System; +using ZoomNet.Models.QualityOfService; + +namespace ZoomNet.Models +{ + /// + /// Quality of service provided to a participant. + /// + public class DashboardParticipantQos + { + /// + /// Gets or sets date-time of QOS. + /// + /// + /// The date-time of the quality of service data. + /// + [JsonProperty(PropertyName = "date_time")] + public DateTime DateTime { get; set; } + + /// + /// Gets or sets audio input data. + /// + /// + /// The quality of service for audio input. + /// + [JsonProperty(PropertyName = "audio_input")] + public PacketQualityOfServiceMetrics AudioInput { get; set; } + + /// + /// Gets or sets audio output data. + /// + /// + /// The quality of service for audio output. + /// + [JsonProperty(PropertyName = "audio_input")] + public PacketQualityOfServiceMetrics AudioOutput { get; set; } + + /// + /// Gets or sets video input data. + /// + /// + /// The quality of service for video input. + /// + [JsonProperty(PropertyName = "video_input")] + public VideoQualityOfServiceMetrics VideoInput { get; set; } + + /// + /// Gets or sets video output data. + /// + /// + /// The quality of service for video output. + /// + [JsonProperty(PropertyName = "video_output")] + public VideoQualityOfServiceMetrics VideoOutput { get; set; } + + /// + /// Gets or sets screen share input data. + /// + /// + /// The quality of service for screen share input. + /// + [JsonProperty(PropertyName = "as_input")] + public VideoQualityOfServiceMetrics ScreenShareInput { get; set; } + + /// + /// Gets or sets screen share output data. + /// + /// + /// The quality of service for screen share output. + /// + [JsonProperty(PropertyName = "as_output")] + public VideoQualityOfServiceMetrics ScreenShareOutput { get; set; } + + /// + /// Gets or sets the CPU usage data. + /// + /// + /// The CPU usage data. + /// + [JsonProperty(PropertyName = "cpu_usage")] + public CpuUsage CpuUsage { get; set; } + + /// + /// Gets or sets the value of metrics on audio being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + /// + /// Metrics on audio being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + [JsonProperty(PropertyName = "audio_device_from_crc")] + public PacketQualityOfServiceMetrics AudioDeviceFromCrc { get; set; } + + /// + /// Gets or sets the value of metrics on audio received by a participant who joined the meeting via a Cloud Room Connector. + /// + /// + /// Metrics on audio received by a participant who joined the meeting via a Cloud Room Connector. + /// + [JsonProperty(PropertyName = "audio_device_to_crc")] + public PacketQualityOfServiceMetrics AudioDeviceToCrc { get; set; } + + /// + /// Gets or sets the value of metrics on video being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + /// + /// Metrics on video being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + [JsonProperty(PropertyName = "video_device_from_crc")] + public PacketQualityOfServiceMetrics VideoDeviceFromCrc { get; set; } + + /// + /// Gets or sets the value of metrics on video received by a participant who joined the meeting via a Cloud Room Connector. + /// + /// + /// Metrics on video received by a participant who joined the meeting via a Cloud Room Connector. + /// + [JsonProperty(PropertyName = "audio_device_to_crc")] + public PacketQualityOfServiceMetrics VideoDeviceToCrc { get; set; } + + /// + /// Gets or sets the value of metrics on screen share being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + /// + /// Metrics on screen share being sent from a Cloud Room Connector used by the participant to join the meeting. + /// + [JsonProperty(PropertyName = "as_device_from_crc")] + public PacketQualityOfServiceMetrics ScreenShareDeviceFromCrc { get; set; } + + /// + /// Gets or sets the value of metrics on screen share received by a participant who joined the meeting via a Cloud Room Connector. + /// + /// + /// Metrics on screen share received by a participant who joined the meeting via a Cloud Room Connector. + /// + [JsonProperty(PropertyName = "as_device_to_crc")] + public PacketQualityOfServiceMetrics ScreenShareDeviceToCrc { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ImMetric.cs b/Source/ZoomNet/Models/ImMetric.cs new file mode 100644 index 00000000..c36dd191 --- /dev/null +++ b/Source/ZoomNet/Models/ImMetric.cs @@ -0,0 +1,143 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Metric for chat room usage. + /// + public class ImMetric + { + /// + /// Gets or sets the user id. + /// + /// The user id. + [JsonProperty(PropertyName = "user_id")] + public string UserId { get; set; } + + /// + /// Gets or sets the user display name. + /// + /// The user display name. + [JsonProperty(PropertyName = "user_name")] + public string UserName { get; set; } + + /// + /// Gets or sets the user email. + /// + /// The user email. + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + /// + /// Gets or sets the total number of messages sent by the user. + /// + /// The total number of messages sent by the user. + [JsonProperty(PropertyName = "total_send")] + public int TotalSend { get; set; } + + /// + /// Gets or sets total number of messages received by the user. + /// + /// The total number of messages received by the user. + [JsonProperty(PropertyName = "total_receive")] + public int TotalReceive { get; set; } + + /// + /// Gets or sets total number of messages sent by the user in channels. + /// + /// The total number of messages sent by the user in channels. + [JsonProperty(PropertyName = "group_send")] + public int GroupSend { get; set; } + + /// + /// Gets or sets total number of messages received by the user in channels. + /// + /// The total number of messages received by the user in channels. + [JsonProperty(PropertyName = "group_receive")] + public int GroupReceive { get; set; } + + /// + /// Gets or sets total number of instant meeting calls made by the user. + /// + /// The total number of instant meeting calls made by the user. + [JsonProperty(PropertyName = "calls_send")] + public int CallsSend { get; set; } + + /// + /// Gets or sets total number of instant meeting calls received by the user. + /// + /// The total number of instant meeting calls received by the user. + [JsonProperty(PropertyName = "calls_receive")] + public int CallReceive { get; set; } + + /// + /// Gets or sets total number of files sent by the user. + /// + /// The total number of files sent by the user. + [JsonProperty(PropertyName = "files_send")] + public int FilesSend { get; set; } + + /// + /// Gets or sets total number of files received by the user. + /// + /// The total number of files received by the user. + [JsonProperty(PropertyName = "files_receive")] + public int FilesReceive { get; set; } + + /// + /// Gets or sets total number of images sent by the user. + /// + /// The total number of images sent by the user. + [JsonProperty(PropertyName = "images_send")] + public int ImagesSend { get; set; } + + /// + /// Gets or sets total number of images received by the user. + /// + /// The total number of images received by the user. + [JsonProperty(PropertyName = "images_receive")] + public int ImagesReceive { get; set; } + + /// + /// Gets or sets total number of voice files sent by the user. + /// + /// The total number of voice files sent by the user. + [JsonProperty(PropertyName = "voice_send")] + public int VoiceSend { get; set; } + + /// + /// Gets or sets total number of voice files received by the user. + /// + /// The total number of voice files received by the user. + [JsonProperty(PropertyName = "voice_receive")] + public int VoiceReceive { get; set; } + + /// + /// Gets or sets total number of video files sent by the user. + /// + /// The total number of video files sent by the user. + [JsonProperty(PropertyName = "videos_send")] + public int VideosSend { get; set; } + + /// + /// Gets or sets total number of video files received by the user. . + /// + /// The total number of video files received by the user. + [JsonProperty(PropertyName = "videos_receive")] + public int VideosReceive { get; set; } + + /// + /// Gets or sets total number of emojis sent by the user. + /// + /// The total number of emojis sent by the user. + [JsonProperty(PropertyName = "emoji_send")] + public int EmojiSend { get; set; } + + /// + /// Gets or sets total number of emojis received by the user. + /// + /// The total number of emojis received by the user. + [JsonProperty(PropertyName = "emoji_receive")] + public int EmojiReceive { get; set; } + } +} diff --git a/Source/ZoomNet/Models/IssueType.cs b/Source/ZoomNet/Models/IssueType.cs new file mode 100644 index 00000000..a0cb7714 --- /dev/null +++ b/Source/ZoomNet/Models/IssueType.cs @@ -0,0 +1,175 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + +namespace ZoomNet.Models +{ + /// + /// Possible issue types in a Zoom room. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum IssueType + { + /// + /// Room Controller disconnected. + /// + [EnumMember(Value = "Room Controller disconnected")] + RoomControllerDisconnected, + + /// + /// Room Controller connected. + /// + [EnumMember(Value = "Room Controller connected")] + RoomControllerConnected, + + /// + /// Selected camera has disconnected. + /// + [EnumMember(Value = "Selected camera has disconnected")] + SelectedCameraHasDisconnected, + + /// + /// Selected camera is reconnected. + /// + [EnumMember(Value = "Selected camera is reconnected")] + SelectedCameraIsReconnected, + + /// + /// Selected microphone has disconnected. + /// + [EnumMember(Value = "Selected microphone has disconnected")] + SelectedMicrophoneHasDisconnected, + + /// + /// Selected microphone is reconnected. + /// + [EnumMember(Value = "Selected microphone is reconnected")] + SelectedMicrophoneIsReconnected, + + /// + /// Selected speaker has disconnected. + /// + [EnumMember(Value = "Selected speaker has disconnected")] + SelectedSpeakerHasDisconnected, + + /// + /// Selected speaker is reconnected. + /// + [EnumMember(Value = "Selected speaker is reconnected")] + SelectedSpeakerIsReconnected, + + /// + /// Zoom room is offline. + /// + [EnumMember(Value = "Zoom room is offline")] + ZoomRoomIsOffline, + + /// + /// Zoom room is online. + /// + [EnumMember(Value = "Zoom room is online")] + ZoomRoomIsOnline, + + /// + /// High CPU usage is detected. + /// + [EnumMember(Value = "High CPU usage is detected")] + HighCpuUsageIsDetected, + + /// + /// Low bandwidth network is detected. + /// + [EnumMember(Value = "Low bandwidth network is detected")] + LowBandwidthNetworkIsDetected, + + /// + /// Zoom Rooms Computer battery is low. + /// + [EnumMember(Value = "Zoom Rooms Computer battery is low")] + ZoomRoomsComputerBatteryIsLow, + + /// + /// Zoom Rooms Computer battery is normal. + /// + [EnumMember(Value = "Zoom Rooms Computer battery is normal")] + ZoomRoomsComputerBatteryIsNormal, + + /// + /// Zoom Rooms Computer disconnected. + /// + [EnumMember(Value = "Zoom Rooms Computer disconnected")] + ZoomRoomsComputerDisconnected, + + /// + /// Zoom Rooms Computer connected. + /// + [EnumMember(Value = "Zoom Rooms Computer connected")] + ZoomRoomsComputerConnected, + + /// + /// Zoom Rooms Computer is not charging. + /// + [EnumMember(Value = "Zoom Rooms Computer is not charging")] + ZoomRoomsComputerIsNotCharging, + + /// + /// Controller battery is low. + /// + [EnumMember(Value = "Controller battery is low")] + ControllerBatteryIsLow, + + /// + /// Controller battery is normal. + /// + [EnumMember(Value = "Controller battery is normal")] + ControllerBatteryIsNormal, + + /// + /// Controller disconnected. + /// + [EnumMember(Value = "Controller disconnected")] + ControllerDisconnected, + + /// + /// Controller connected. + /// + [EnumMember(Value = "Controller connected")] + ControllerConnected, + + /// + /// Controller is not charging. + /// + [EnumMember(Value = "Controller is not charging")] + ControllerIsNotCharging, + + /// + /// Scheduling Display battery is low. + /// + [EnumMember(Value = "Scheduling Display battery is low")] + SchedulingDisplayBatteryIsLow, + + /// + /// Scheduling Display battery is normal. + /// + [EnumMember(Value = "Scheduling Display battery is normal")] + SchedulingDisplayBatteryIsNormal, + + /// + /// Scheduling Display disconnected. + /// + [EnumMember(Value = "Scheduling Display disconnected")] + SchedulingDisplayDisconnected, + + /// + /// Scheduling Display connected. + /// + [EnumMember(Value = "Scheduling Display connected")] + SchedulingDisplayConnected, + + /// + /// Scheduling Display is not charging. + /// + [EnumMember(Value = "Scheduling Display is not charging")] + SchedulingDisplayIsNotCharging + } +} diff --git a/Source/ZoomNet/Models/IssuesOfZoomRooms.cs b/Source/ZoomNet/Models/IssuesOfZoomRooms.cs new file mode 100644 index 00000000..3251b654 --- /dev/null +++ b/Source/ZoomNet/Models/IssuesOfZoomRooms.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Top issues from Zoom rooms. + /// + public class IssuesOfZoomRooms + { + /// + /// Gets or sets the Issue Name.
+ /// The value of the this field could be one of the following:
+ /// * `Room Controller disconnected`
+ /// * `Room Controller connected`
+ /// * `Selected camera has disconnected`
+ /// * `Selected camera is reconnected`
+ /// * `Selected microphone has disconnected`
+ /// * `Selected microphone is reconnected`
+ /// * `Selected speaker has disconnected`
+ /// * `Selected speaker is reconnected`
+ /// * `Zoom room is offline`
+ /// * `Zoom room is online`
+ /// * `High CPU usage is detected`
+ /// * `Low bandwidth network is detected`
+ /// * `{name} battery is low`
+ /// * `{name} battery is normal`
+ /// * `{name} disconnected`
+ /// * `{name} connected`
+ /// * `{name} is not charging`

+ /// Possible values for {name}:
+ /// * Zoom Rooms Computer
+ /// * Controller
+ /// * Scheduling Display.
+ ///
+ /// The Issue name. + [JsonProperty(PropertyName = "issue_name")] + public IssueType IssueType { get; set; } + + /// + /// Gets or sets the count of Zoom rooms where the issue appeared. + /// + /// The count of Zoom rooms where the issue appeared. + [JsonProperty(PropertyName = "zoom_rooms_count")] + public int ZoomRoomsCount { get; set; } + } +} diff --git a/Source/ZoomNet/Models/IssuesOfZoomRoomsReport.cs b/Source/ZoomNet/Models/IssuesOfZoomRoomsReport.cs new file mode 100644 index 00000000..46ce6c48 --- /dev/null +++ b/Source/ZoomNet/Models/IssuesOfZoomRoomsReport.cs @@ -0,0 +1,39 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Top issues across Zoom rooms for the given date range. + /// + public class IssuesOfZoomRoomsReport + { + /// + /// Gets or sets the start date for this report. + /// + /// The start date for this report. + [JsonProperty(PropertyName = "from")] + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for this report. + /// + /// The end date for this report. + [JsonProperty(PropertyName = "to")] + public DateTime To { get; set; } + + /// + /// Gets or sets the number of all records available across pages. + /// + /// The number of all records available across pages. + [JsonProperty(PropertyName = "total_records")] + public int TotalRecords { get; set; } + + /// + /// Gets or sets the collection of Zoom room issues. + /// + /// The collection of Zoom room issues. + [JsonProperty(PropertyName = "issues")] + public IssuesOfZoomRooms[] Issues { get; set; } + } +} diff --git a/Source/ZoomNet/Models/MeetingListType.cs b/Source/ZoomNet/Models/MeetingListType.cs index c09bd13b..2197bb72 100644 --- a/Source/ZoomNet/Models/MeetingListType.cs +++ b/Source/ZoomNet/Models/MeetingListType.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime.Serialization; @@ -26,6 +26,6 @@ public enum MeetingListType /// Upcoming. /// [EnumMember(Value = "upcoming")] - Upcoming + Upcoming, } } diff --git a/Source/ZoomNet/Models/PaginatedResponseWithTokenAndDateRange.cs b/Source/ZoomNet/Models/PaginatedResponseWithTokenAndDateRange.cs new file mode 100644 index 00000000..d28a3be4 --- /dev/null +++ b/Source/ZoomNet/Models/PaginatedResponseWithTokenAndDateRange.cs @@ -0,0 +1,24 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Pagination Object. + /// + /// The type of records. + public class PaginatedResponseWithTokenAndDateRange : PaginatedResponseWithToken + { + /// + /// Gets or sets the start date for the report. + /// + /// Start date for this report. + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for the report. + /// + /// End date for this report. + public DateTime To { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ParticipantSharingDetails.cs b/Source/ZoomNet/Models/ParticipantSharingDetails.cs new file mode 100644 index 00000000..7e2146ea --- /dev/null +++ b/Source/ZoomNet/Models/ParticipantSharingDetails.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Sharing and recording details of participants from live or past meetings. + /// + public class ParticipantSharingDetails + { + /// + /// Gets or sets the Universally unique identifier of the participant. + /// + /// + /// The Universally unique identifier of the participant. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the participant ID. + /// + /// + /// The participant ID. + /// + [JsonProperty(PropertyName = "user_id")] + public string UserId { get; set; } + + /// + /// Gets or sets the participant display name. + /// + /// + /// The participant display name. + /// + [JsonProperty(PropertyName = "user_name")] + public string UserName { get; set; } + + /// + /// Gets or sets the sharing details. + /// + /// + /// An array of sharing and recording details. + /// + [JsonProperty(PropertyName = "details")] + public SharingAndRecordingDetail[] SharingAndRecordingDetails { get; set; } + } +} diff --git a/Source/ZoomNet/Models/QualityOfService/CpuUsage.cs b/Source/ZoomNet/Models/QualityOfService/CpuUsage.cs new file mode 100644 index 00000000..fc83d674 --- /dev/null +++ b/Source/ZoomNet/Models/QualityOfService/CpuUsage.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models.QualityOfService +{ + /// + /// CPU usage metrics. + /// + public class CpuUsage + { + /// + /// Gets or sets the Zoom minimum cpu usage. + /// + /// + /// The minimum value for Zoom CPU usage. + /// + [JsonProperty(PropertyName ="zoom_min_cpu_usage")] + public string MinCpuUsage { get; set; } + + /// + /// Gets or sets the Zoom average cpu usage. + /// + /// + /// The average value for Zoom CPU usage. + /// + [JsonProperty(PropertyName = "zoom_avg_cpu_usage")] + public string AverageCpuUsage { get; set; } + + /// + /// Gets or sets the Zoom maximum cpu usage. + /// + /// + /// The maximum value for Zoom CPU usage. + /// + [JsonProperty(PropertyName = "zoom_max_cpu_usage")] + public string MaxCpuUsage { get; set; } + + /// + /// Gets or sets the system maximum cpu usage. + /// + /// + /// The maximum value for system CPU usage. + /// + [JsonProperty(PropertyName = "system_max_cpu_usage")] + public string SystemMaxCpuUsage { get; set; } + } +} diff --git a/Source/ZoomNet/Models/QualityOfService/PacketQualityOfServiceMetrics.cs b/Source/ZoomNet/Models/QualityOfService/PacketQualityOfServiceMetrics.cs new file mode 100644 index 00000000..179c73c2 --- /dev/null +++ b/Source/ZoomNet/Models/QualityOfService/PacketQualityOfServiceMetrics.cs @@ -0,0 +1,55 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models.QualityOfService +{ + /// + /// Quality of service data. + /// + public class PacketQualityOfServiceMetrics + { + /// + /// Gets or sets the bitrate value. + /// + /// + /// Bitrate: The number of bits per second that can be transmitted along a digital network. + /// + [JsonProperty(PropertyName = "bitrate")] + public string Bitrate { get; set; } + + /// + /// Gets or sets the latency value. + /// + /// + /// Latency: The amount of time it takes for a pack to travel from one point to another. In Zoom's case, an audio, video, or screen share packet. + /// + [JsonProperty(PropertyName = "latency")] + public string Latency { get; set; } + + /// + /// Gets or sets the jitter value. + /// + /// + /// Jitter: The variation in the delay of received packets. + /// + [JsonProperty(PropertyName = "jitter")] + public string Jitter { get; set; } + + /// + /// Gets or sets the average loss value. + /// + /// + /// Average Loss: The average amount of packet loss, that is the percentage of packets that fail to arrive at their destination. + /// + [JsonProperty(PropertyName = "avg_loss")] + public string AverageLoss { get; set; } + + /// + /// Gets or sets the max loss value. + /// + /// + /// Max Loss: The max amount of packet loss, that is the max percentage of packets that fail to arrive at their destination. + /// + [JsonProperty(PropertyName = "max_loss")] + public string MaxLoss { get; set; } + } +} diff --git a/Source/ZoomNet/Models/QualityOfService/VideoQualityOfServiceMetrics.cs b/Source/ZoomNet/Models/QualityOfService/VideoQualityOfServiceMetrics.cs new file mode 100644 index 00000000..4f88458d --- /dev/null +++ b/Source/ZoomNet/Models/QualityOfService/VideoQualityOfServiceMetrics.cs @@ -0,0 +1,28 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models.QualityOfService +{ + /// + /// Quality of service data for video. + /// + public class VideoQualityOfServiceMetrics : PacketQualityOfServiceMetrics + { + /// + /// Gets or sets the resolution value. + /// + /// + /// The video resolution. + /// + [JsonProperty(PropertyName = "resolution")] + public string Resolution { get; set; } + + /// + /// Gets or sets the frame rate value. + /// + /// + /// The frame rate. + /// + [JsonProperty(PropertyName = "frame_rate")] + public string FrameRate { get; set; } + } +} diff --git a/Source/ZoomNet/Models/SharingAndRecordingDetail.cs b/Source/ZoomNet/Models/SharingAndRecordingDetail.cs new file mode 100644 index 00000000..17fb554a --- /dev/null +++ b/Source/ZoomNet/Models/SharingAndRecordingDetail.cs @@ -0,0 +1,37 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Details of a sharing or recording by a meeting participant. + /// + public class SharingAndRecordingDetail + { + /// + /// Gets or sets the type of content shared. + /// + /// + /// The type of content of the sharing/recording. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// Gets or sets the start time of the sharing. + /// + /// + /// The start time of the sharing. + /// + [JsonProperty(PropertyName = "start_time")] + public string StartTime { get; set; } + + /// + /// Gets or sets the end time of the sharing. + /// + /// + /// The end time of the sharing. + /// + [JsonProperty(PropertyName = "end_time")] + public string EndTime { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ZoomRoom.cs b/Source/ZoomNet/Models/ZoomRoom.cs new file mode 100644 index 00000000..01a0bcba --- /dev/null +++ b/Source/ZoomNet/Models/ZoomRoom.cs @@ -0,0 +1,154 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Zoom Room. + /// + public class ZoomRoom + { + /// + /// Gets or sets the room id. + /// + /// + /// The room id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the room name. + /// + /// + /// The room name. + /// + [JsonProperty(PropertyName = "room_name")] + public string Name { get; set; } + + /// + /// Gets or sets the Zoom calendar name. + /// + /// + /// The Zoom calendar name. + /// + [JsonProperty(PropertyName = "calender_name")] + public string CalendarName { get; set; } + + /// + /// Gets or sets the Zoom room email. + /// + /// + /// The Zoom room email. + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + /// + /// Gets or sets the Zoom room email type. + /// + /// + /// Zoom room email type. + /// + [JsonProperty(PropertyName = "account_type")] + public string AccountType { get; set; } + + /// + /// Gets or sets the Zoom room status. + /// + /// + /// The Zoom room status. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the Zoom room device IP. + /// + /// + /// The Zoom room device IP. + /// + [JsonProperty(PropertyName = "device_ip")] + public string DeviceIp { get; set; } + + /// + /// Gets or sets the Zoom room camera. + /// + /// + /// The Zoom room camera. + /// + [JsonProperty(PropertyName = "camera")] + public string Camera { get; set; } + + /// + /// Gets or sets the Zoom room microphone. + /// + /// + /// The Zoom room microphone. + /// + [JsonProperty(PropertyName = "microphone")] + public string Microphone { get; set; } + + /// + /// Gets or sets the Zoom room speaker. + /// + /// + /// The Zoom room speaker. + /// + [JsonProperty(PropertyName = "speaker")] + public string Speaker { get; set; } + + /// + /// Gets or sets the last start time of the Zoom room. + /// + /// + /// The last start time of the Zoom room. + /// + [JsonProperty(PropertyName = "last_start_time")] + public string LastStartTime { get; set; } + + /// + /// Gets or sets the Zoom room location. + /// + /// + /// The Zoom room location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the health value. + /// + /// + /// The health value. + /// + [JsonProperty(PropertyName = "health")] + public string Health { get; set; } + + /// + /// Gets or sets Zoom room issues. + /// + /// + /// Zoom room issues. + /// + [JsonProperty(PropertyName = "issues")] + public string[] Issues { get; set; } + + /// + /// Gets or sets information on the live meeting in the Zoom room. + /// + /// + /// Metrics on the currently live meeting if there is one. + /// + [JsonProperty(PropertyName = "live_meeting", NullValueHandling = NullValueHandling.Ignore)] + public DashboardMeetingMetrics LiveMeeting { get; set; } + + /// + /// Gets or sets metrics for previous meetings that happened in this Zoom room. + /// + /// + /// Pagination object to get metrics on previous meetings that happened in this Zoom room. + /// + [JsonProperty(PropertyName = "past_meetings", NullValueHandling = NullValueHandling.Ignore)] + public DashboardMeetingMetricsPaginationObject PastMeetings { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ZoomRoomIssueDetails.cs b/Source/ZoomNet/Models/ZoomRoomIssueDetails.cs new file mode 100644 index 00000000..f29a56d2 --- /dev/null +++ b/Source/ZoomNet/Models/ZoomRoomIssueDetails.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Details of an issue for a Zoom room. + /// + public class ZoomRoomIssueDetails + { + /// + /// Gets or sets the Issue Name.
+ /// The value of the this field could be one of the following:
+ /// * `Room Controller disconnected`
+ /// * `Room Controller connected`
+ /// * `Selected camera has disconnected`
+ /// * `Selected camera is reconnected`
+ /// * `Selected microphone has disconnected`
+ /// * `Selected microphone is reconnected`
+ /// * `Selected speaker has disconnected`
+ /// * `Selected speaker is reconnected`
+ /// * `Zoom room is offline`
+ /// * `Zoom room is online`
+ /// * `High CPU usage is detected`
+ /// * `Low bandwidth network is detected`
+ /// * `{name} battery is low`
+ /// * `{name} battery is normal`
+ /// * `{name} disconnected`
+ /// * `{name} connected`
+ /// * `{name} is not charging`

+ /// Possible values for {name}:
+ /// * Zoom Rooms Computer
+ /// * Controller
+ /// * Scheduling Display.
+ ///
+ /// The Issue name. + [JsonProperty(PropertyName = "issue_name")] + public IssueType IssueType { get; set; } + + /// + /// Gets or sets the time the issue appeared. + /// + /// The time the issue appeared. + [JsonProperty(PropertyName = "time")] + public DateTime ZoomRoomsCount { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ZoomRoomWithIssues.cs b/Source/ZoomNet/Models/ZoomRoomWithIssues.cs new file mode 100644 index 00000000..254e91e6 --- /dev/null +++ b/Source/ZoomNet/Models/ZoomRoomWithIssues.cs @@ -0,0 +1,31 @@ +using Newtonsoft.Json; + +namespace ZoomNet.Models +{ + /// + /// Zoom room with issues. + /// + public class ZoomRoomWithIssues + { + /// + /// Gets or sets the Zoom room id. + /// + /// The Zoom room id. + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the Zoom room name. + /// + /// The Zoom room name. + [JsonProperty(PropertyName = "room_name")] + public string Name { get; set; } + + /// + /// Gets or sets the count of issues in the Zoom room. + /// + /// The count of issues in the Zoom room. + [JsonProperty(PropertyName = "issues_count")] + public int IssuesCount { get; set; } + } +} diff --git a/Source/ZoomNet/Models/ZoomRoomWithIssuesReport.cs b/Source/ZoomNet/Models/ZoomRoomWithIssuesReport.cs new file mode 100644 index 00000000..90761043 --- /dev/null +++ b/Source/ZoomNet/Models/ZoomRoomWithIssuesReport.cs @@ -0,0 +1,39 @@ +using Newtonsoft.Json; +using System; + +namespace ZoomNet.Models +{ + /// + /// Top Zoom rooms with issues for the given date range. + /// + public class ZoomRoomWithIssuesReport + { + /// + /// Gets or sets the start date for this report. + /// + /// The start date for this report. + [JsonProperty(PropertyName = "from")] + public DateTime From { get; set; } + + /// + /// Gets or sets the end date for this report. + /// + /// The end date for this report. + [JsonProperty(PropertyName = "to")] + public DateTime To { get; set; } + + /// + /// Gets or sets the number of all records available across pages. + /// + /// The number of all records available across pages. + [JsonProperty(PropertyName = "total_records")] + public int TotalRecords { get; set; } + + /// + /// Gets or sets the collection of Zoom rooms with issues. + /// + /// The collection of Zoom rooms with issues. + [JsonProperty(PropertyName = "zoom_rooms")] + public ZoomRoomWithIssues[] ZoomRooms { get; set; } + } +} diff --git a/Source/ZoomNet/Resources/Dashboards.cs b/Source/ZoomNet/Resources/Dashboards.cs new file mode 100644 index 00000000..fc710d9d --- /dev/null +++ b/Source/ZoomNet/Resources/Dashboards.cs @@ -0,0 +1,630 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Pathoschild.Http.Client; +using System; +using System.Threading; +using System.Threading.Tasks; +using ZoomNet.Models; + +namespace ZoomNet.Resources +{ + /// + /// Allows you to view various metrics. + /// + /// + /// See Zoom documentation for more information. + /// + public class Dashboards : IDashboards + { + private readonly IClient _client; + + /// + /// Initializes a new instance of the class. + /// + /// The HTTP client. + 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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/meetings") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/meetings/{meetingId}") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/meetings/{meetingId}/participants") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithTokenAndDateRange("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 + .GetAsync($"metrics/meetings/{meetingId}/participants/{participantId}/qos") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 10"); + } + + return _client + .GetAsync($"metrics/meetings/{meetingId}/participants/qos") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/meetings/{meetingId}/participants/sharing") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/webinars") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/webinars/{webinarId}") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/webinars/{webinarId}/participants") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithTokenAndDateRange("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 + .GetAsync($"metrics/webinars/{webinarId}/participants/{participantId}/qos") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 10"); + } + + return _client + .GetAsync($"metrics/webinars/{webinarId}/participants/qos") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/webinars/{webinarId}/participants/sharing") + .WithArgument("type", JToken.Parse(JsonConvert.SerializeObject(type)).ToString()) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/zoomrooms") + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/zoomrooms/{zoomRoomId}") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/crc") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/im") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/client/feedback") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/zoomrooms/issues") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/issues/zoomrooms") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/issues/zoomrooms/{zoomRoomId}") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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) + { + throw new ArgumentOutOfRangeException(nameof(pageSize), "Page size must be between 1 and 300"); + } + + return _client + .GetAsync($"metrics/client/feedback/{feedbackId}") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithArgument("page_size", pageSize) + .WithArgument("next_page_token", pageToken) + .WithCancellationToken(cancellationToken) + .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 + .GetAsync($"metrics/client/satisfaction") + .WithArgument("from", from.ToString("yyyy-MM-dd")) + .WithArgument("to", to.ToString("yyyy-MM-dd")) + .WithCancellationToken(cancellationToken) + .AsObject(); + } + } +} diff --git a/Source/ZoomNet/Resources/IDashboards.cs b/Source/ZoomNet/Resources/IDashboards.cs new file mode 100644 index 00000000..83539ce3 --- /dev/null +++ b/Source/ZoomNet/Resources/IDashboards.cs @@ -0,0 +1,359 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using ZoomNet.Models; + +namespace ZoomNet.Resources +{ + /// + /// Allows you to view various metrics. + /// + /// + /// See Zoom documentation for more information. + /// + public interface IDashboards + { + /// + /// 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. + /// + Task> GetAllMeetingsAsync(DateTime from, DateTime to, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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 . + /// + Task GetMeetingAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default); + + /// + /// 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. + /// + Task> GetMeetingParticipantsAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetMeetingParticipantQosAsync(string meetingId, string participantId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default); + + /// + /// 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 participants. + /// + Task> GetAllMeetingParticipantsQosAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 1, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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.. + /// + Task> GetAllMeetingParticipantSharingDetailsAsync(string meetingId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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 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 webinars.. + /// + Task> GetAllWebinarsAsync(DateTime from, DateTime to, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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 . + /// + Task GetWebinarAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default); + + /// + /// 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. + /// + Task> GetWebinarParticipantsAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetWebinarParticipantQosAsync(string webinarId, string participantId, DashboardMeetingType type = DashboardMeetingType.Live, CancellationToken cancellationToken = default); + + /// + /// 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 participants. + /// + Task> GetAllWebinarParticipantQosAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 1, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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.. + /// + Task> GetAllWebinarParticipantSharingDetailsAsync(string webinarId, DashboardMeetingType type = DashboardMeetingType.Live, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task> GetAllZoomRoomsAsync(int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetRoomDetailsAsync(string roomId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetCrcPortUsageAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default); + + /// + /// 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. + /// + Task> GetImMetricsAsync(DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetClientFeedbackMetricsAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetIssuesOfZoomRoomsAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default); + + /// + /// Get information on top 25 Zoom Rooms with issues in a month. The month specified with the “from” and “to” range should fall within the last six months. + /// + /// + /// 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 Zoom rooms with issues. + Task GetZoomRoomsWithIssuesAsync(DateTime from, DateTime to, CancellationToken cancellationToken = default); + + /// + /// 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. + /// + Task> GetIssuesOfZoomRoomAsync(string zoomRoomId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + /// + Task> GetZoomMeetingsClientFeedbackAsync(string feedbackId, DateTime from, DateTime to, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default); + + /// + /// 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. + Task GetClientMeetingSatisfactionMetrics(DateTime from, DateTime to, CancellationToken cancellationToken = default); + } +} diff --git a/Source/ZoomNet/ZoomClient.cs b/Source/ZoomNet/ZoomClient.cs index 53a90405..f2ec0c6f 100644 --- a/Source/ZoomNet/ZoomClient.cs +++ b/Source/ZoomNet/ZoomClient.cs @@ -95,6 +95,11 @@ public static string Version /// public IWebinars Webinars { get; private set; } + /// + /// Gets the resource which allows you to view metrics. + /// + public IDashboards Dashboards { get; private set; } + #endregion #region CTOR @@ -184,6 +189,7 @@ private ZoomClient(IConnectionInfo connectionInfo, HttpClient httpClient, bool d PastWebinars = new PastWebinars(_fluentClient); Users = new Users(_fluentClient); Webinars = new Webinars(_fluentClient); + Dashboards = new Dashboards(_fluentClient); } /// From 5f2b04d869e3ded7060f5fd870581b704f94c513 Mon Sep 17 00:00:00 2001 From: Jericho Date: Mon, 7 Sep 2020 09:18:08 -0400 Subject: [PATCH 8/9] PastMeetings.GetFilesAsync method is obsolete Resolves #49 --- Source/ZoomNet/Resources/IPastMeetings.cs | 2 ++ Source/ZoomNet/Resources/PastMeetings.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Source/ZoomNet/Resources/IPastMeetings.cs b/Source/ZoomNet/Resources/IPastMeetings.cs index 5496ed9e..d9d3269f 100644 --- a/Source/ZoomNet/Resources/IPastMeetings.cs +++ b/Source/ZoomNet/Resources/IPastMeetings.cs @@ -1,3 +1,4 @@ +using System; using System.Threading; using System.Threading.Tasks; using ZoomNet.Models; @@ -65,6 +66,7 @@ public interface IPastMeetings /// /// An array of . /// + [Obsolete("This method has been deprecated and is no longer supported due to GCM encryption updates for security purposes")] Task GetFilesAsync(long meetingId, CancellationToken cancellationToken = default); } } diff --git a/Source/ZoomNet/Resources/PastMeetings.cs b/Source/ZoomNet/Resources/PastMeetings.cs index 1438c396..8b115125 100644 --- a/Source/ZoomNet/Resources/PastMeetings.cs +++ b/Source/ZoomNet/Resources/PastMeetings.cs @@ -111,6 +111,7 @@ public Task GetPollResultsAsync(long meetingId, CancellationToken /// /// 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) { return _client From fa3a069d71141d4e2644ea370bcb61e0d66094f3 Mon Sep 17 00:00:00 2001 From: Jericho Date: Mon, 7 Sep 2020 09:24:30 -0400 Subject: [PATCH 9/9] Integration tests for Dashboards --- .../Tests/Dashboards.cs | 22 +++++++++++++++++++ .../ZoomNet.IntegrationTests/TestsRunner.cs | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Source/ZoomNet.IntegrationTests/Tests/Dashboards.cs diff --git a/Source/ZoomNet.IntegrationTests/Tests/Dashboards.cs b/Source/ZoomNet.IntegrationTests/Tests/Dashboards.cs new file mode 100644 index 00000000..b3ac463b --- /dev/null +++ b/Source/ZoomNet.IntegrationTests/Tests/Dashboards.cs @@ -0,0 +1,22 @@ +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using ZoomNet.Models; + +namespace ZoomNet.IntegrationTests.Tests +{ + public class Dashboards : IIntegrationTest + { + public async Task RunAsync(string userId, IZoomClient client, TextWriter log, CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) return; + + await log.WriteLineAsync("\n***** DASHBOARDS *****\n").ConfigureAwait(false); + + // GET ALL THE MEETINGS + var pastMeetingsStats = await client.Dashboards.GetAllMeetingsAsync(DateTime.UtcNow.AddMonths(-1), DateTime.UtcNow, DashboardMeetingType.Past, 100, null, cancellationToken).ConfigureAwait(false); + await log.WriteLineAsync($"There are {pastMeetingsStats.TotalRecords} meetings in the last month").ConfigureAwait(false); + } + } +} diff --git a/Source/ZoomNet.IntegrationTests/TestsRunner.cs b/Source/ZoomNet.IntegrationTests/TestsRunner.cs index 3a59710b..85a74da1 100644 --- a/Source/ZoomNet.IntegrationTests/TestsRunner.cs +++ b/Source/ZoomNet.IntegrationTests/TestsRunner.cs @@ -6,7 +6,6 @@ using System.Threading; using System.Threading.Tasks; using ZoomNet.IntegrationTests.Tests; -using ZoomNet.Utilities; namespace ZoomNet.IntegrationTests { @@ -96,6 +95,7 @@ public async Task RunAsync() // These are the integration tests that we will execute var integrationTests = new Type[] { + typeof(Dashboards), typeof(Meetings), typeof(Users), typeof(Webinars),