From 125c8f4e36f314021c8ab782cd80a339b87a7d87 Mon Sep 17 00:00:00 2001 From: Jericho Date: Wed, 29 Jun 2022 14:36:34 -0400 Subject: [PATCH 1/4] The Meetings.GetAllAsync method return summary information about meetings. It does not return all the available information about these meetings. --- Source/ZoomNet/Models/MeetingSummary.cs | 89 +++++++++++++++++++++++++ Source/ZoomNet/Resources/IMeetings.cs | 17 ++--- Source/ZoomNet/Resources/Meetings.cs | 32 ++------- 3 files changed, 104 insertions(+), 34 deletions(-) create mode 100644 Source/ZoomNet/Models/MeetingSummary.cs diff --git a/Source/ZoomNet/Models/MeetingSummary.cs b/Source/ZoomNet/Models/MeetingSummary.cs new file mode 100644 index 00000000..ff57ea86 --- /dev/null +++ b/Source/ZoomNet/Models/MeetingSummary.cs @@ -0,0 +1,89 @@ +using System; +using System.Text.Json.Serialization; + +namespace ZoomNet.Models +{ + /// + /// Summary information about a meeting. + /// + public class MeetingSummary + { + /// Gets or sets the meeting description. + /// + /// The length of agenda gets truncated to 250 characters + /// when you list all meetings for a user. To view the complete + /// agenda of a meeting, retrieve details for a single meeting, + /// use the Get a meeting API. + /// + [JsonPropertyName("agenda")] + public string Agenda { get; set; } + + /// + /// Gets or sets the date and time when the meeting was created. + /// + [JsonPropertyName("created_at")] + public DateTime CreatedOn { get; set; } + + /// + /// Gets or sets the duration in minutes. + /// + [JsonPropertyName("duration")] + public int Duration { get; set; } + + /// + /// Gets or sets the ID of the user who is set as the host of the meeting. + /// + [JsonPropertyName("host_id")] + public string HostId { get; set; } + + /// + /// Gets or sets the meeting id, also known as the meeting number. + /// + [JsonPropertyName("id")] + public long Id { get; set; } + + /// + /// Gets or sets the URL for the host to start the meeting. + /// + [JsonPropertyName("start_url")] + public string StartUrl { get; set; } + + /// + /// Gets or sets the personal meeting id. + /// + [JsonPropertyName("pmi")] + public string PersonalMeetingId { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonPropertyName("start_time")] + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the timezone. + /// For example, "America/Los_Angeles". + /// Please reference our timezone list for supported timezones and their formats. + /// + [JsonPropertyName("timezone")] + public string Timezone { get; set; } + + /// + /// Gets or sets the topic of the meeting. + /// + [JsonPropertyName("topic")] + public string Topic { get; set; } + + /// + /// Gets or sets the meeting type. + /// + [JsonPropertyName("type")] + public MeetingType Type { get; set; } + + /// G + /// ets or sets the unique id. + /// + [JsonPropertyName("uuid")] + public string Uuid { get; set; } + } +} diff --git a/Source/ZoomNet/Resources/IMeetings.cs b/Source/ZoomNet/Resources/IMeetings.cs index 59c86483..374f12d2 100644 --- a/Source/ZoomNet/Resources/IMeetings.cs +++ b/Source/ZoomNet/Resources/IMeetings.cs @@ -15,7 +15,7 @@ namespace ZoomNet.Resources public interface IMeetings { /// - /// Retrieve all meetings of the specified type for a user. + /// Retrieve summary information about all meetings of the specified type for a user. /// /// The user Id or email address. /// The type of meetings. Allowed values: Scheduled, Live, Upcoming. @@ -23,16 +23,16 @@ public interface IMeetings /// The current page number of returned records. /// The cancellation token. /// - /// An array of meetings. + /// An array of meeting summaries. /// /// - /// This call omits 'occurrences'. Therefore the 'Occurrences' property will be empty. + /// To obtain the full details about a given meeting you must invoke . /// [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); + 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. + /// Retrieve summary information about all meetings of the specified type for a user. /// /// The user Id or email address. /// The type of meetings. Allowed values: Scheduled, Live, Upcoming. @@ -40,12 +40,13 @@ public interface IMeetings /// The paging token. /// The cancellation token. /// - /// An array of meetings. + /// An array of meeting summaries. /// /// - /// This call omits 'occurrences'. Therefore the 'Occurrences' property will be empty. + /// To obtain the full details about a given meeting you must invoke . /// - Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + + Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); /// /// Creates an instant meeting for a user. diff --git a/Source/ZoomNet/Resources/Meetings.cs b/Source/ZoomNet/Resources/Meetings.cs index b861ed68..f254e36f 100644 --- a/Source/ZoomNet/Resources/Meetings.cs +++ b/Source/ZoomNet/Resources/Meetings.cs @@ -29,19 +29,9 @@ internal Meetings(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// 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 current page number of returned records. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] - public Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) + public Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -54,21 +44,11 @@ public Task> GetAllAsync(string userId, MeetingListTy .WithArgument("page_size", recordsPerPage) .WithArgument("page_number", page) .WithCancellationToken(cancellationToken) - .AsPaginatedResponse("meetings"); + .AsPaginatedResponse("meetings"); } - /// - /// 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) + /// + public Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -81,7 +61,7 @@ public Task> GetAllAsync(string userId, Meet .WithArgument("page_size", recordsPerPage) .WithArgument("next_page_token", pagingToken) .WithCancellationToken(cancellationToken) - .AsPaginatedResponseWithToken("meetings"); + .AsPaginatedResponseWithToken("meetings"); } /// From 00aa2741178ad72c9e7302ede3d3d3a08ba05290 Mon Sep 17 00:00:00 2001 From: Jericho Date: Wed, 29 Jun 2022 20:23:38 -0400 Subject: [PATCH 2/4] The Webinars.GetAllAsync method return summary information about webinars. It does not return all the available information about these webinars. --- Source/ZoomNet/Models/WebinarSummary.cs | 98 +++++++++++++++++++++++++ Source/ZoomNet/Resources/IWebinars.cs | 18 +++-- Source/ZoomNet/Resources/Webinars.cs | 30 ++------ 3 files changed, 116 insertions(+), 30 deletions(-) create mode 100644 Source/ZoomNet/Models/WebinarSummary.cs diff --git a/Source/ZoomNet/Models/WebinarSummary.cs b/Source/ZoomNet/Models/WebinarSummary.cs new file mode 100644 index 00000000..fa7766b5 --- /dev/null +++ b/Source/ZoomNet/Models/WebinarSummary.cs @@ -0,0 +1,98 @@ +using System; +using System.Text.Json.Serialization; + +namespace ZoomNet.Models +{ + /// + /// Summary information about a webinar. + /// + public class WebinarSummary + { + /// + /// Gets or sets the webinar agenda. + /// + /// The agenda. + [JsonPropertyName("agenda")] + public string Agenda { get; set; } + + /// + /// Gets or sets the date and time when the meeting was created. + /// + /// The meeting created time. + [JsonPropertyName("created_at")] + public DateTime CreatedOn { get; set; } + + /// + /// Gets or sets the duration in minutes. + /// + /// The duration in minutes. + [JsonPropertyName("duration")] + public int Duration { get; set; } + + /// + /// Gets or sets the ID of the user who is set as the host of the webinar. + /// + /// + /// The user id. + /// + [JsonPropertyName("host_id")] + public string HostId { get; set; } + + /// + /// Gets or sets the webinar id, also known as the webinar number. + /// + /// + /// The id. + /// + [JsonPropertyName("id")] + public long Id { get; set; } + + /// + /// Gets or sets the URL to join the webinar. + /// + /// The join URL. + [JsonPropertyName("join_url")] + public string JoinUrl { get; set; } + + /// + /// Gets or sets the webinar start time. + /// + /// The webinar start time. + [JsonPropertyName("start_time")] + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the timezone. + /// For example, "America/Los_Angeles". + /// Please reference our timezone list for supported timezones and their formats. + /// + /// The webinar timezone. For example, "America/Los_Angeles". Please reference our timezone list for supported timezones and their formats. + [JsonPropertyName("timezone")] + public string Timezone { get; set; } + + /// + /// Gets or sets the topic of the meeting. + /// + /// + /// The topic. + /// + [JsonPropertyName("topic")] + public string Topic { get; set; } + + /// + /// Gets or sets the webinar type. + /// + /// The webinar type. + [JsonPropertyName("type")] + public WebinarType Type { get; set; } + + /// + /// Gets or sets the unique id. + /// + /// + /// The unique id. + /// + [JsonPropertyName("uuid")] + public string Uuid { get; set; } + } +} diff --git a/Source/ZoomNet/Resources/IWebinars.cs b/Source/ZoomNet/Resources/IWebinars.cs index 1e53afa9..1797b70c 100644 --- a/Source/ZoomNet/Resources/IWebinars.cs +++ b/Source/ZoomNet/Resources/IWebinars.cs @@ -15,29 +15,35 @@ namespace ZoomNet.Resources public interface IWebinars { /// - /// Retrieve all webinars for a user. + /// Retrieve summary information about all webinars for a user. /// /// The user Id or email address. /// The number of records returned within a single API call. /// The current page number of returned records. /// The cancellation token. /// - /// An array of webinars. + /// An array of webinar summaries. /// + /// + /// To obtain the full details about a given webinar you must invoke . + /// [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); + Task> GetAllAsync(string userId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default); /// - /// Retrieve all webinars for a user. + /// Retrieve summary information about 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. + /// An array of webinar summaries. /// - Task> GetAllAsync(string userId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + /// + /// To obtain the full details about a given webinar you must invoke . + /// + Task> GetAllAsync(string userId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); /// /// Creates a scheduled webinar for a user. diff --git a/Source/ZoomNet/Resources/Webinars.cs b/Source/ZoomNet/Resources/Webinars.cs index 6d944b8d..20498a8a 100644 --- a/Source/ZoomNet/Resources/Webinars.cs +++ b/Source/ZoomNet/Resources/Webinars.cs @@ -29,18 +29,9 @@ internal Webinars(Pathoschild.Http.Client.IClient client) _client = client; } - /// - /// Retrieve all webinars for a user. - /// - /// The user Id or email address. - /// The number of records returned within a single API call. - /// The current page number of returned records. - /// The cancellation token. - /// - /// An array of . - /// + /// [Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")] - public Task> GetAllAsync(string userId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) + public Task> GetAllAsync(string userId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -52,20 +43,11 @@ public Task> GetAllAsync(string userId, int recordsPe .WithArgument("page_size", recordsPerPage) .WithArgument("page_number", page) .WithCancellationToken(cancellationToken) - .AsPaginatedResponse("webinars"); + .AsPaginatedResponse("webinars"); } - /// - /// 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) + /// + public Task> GetAllAsync(string userId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { if (recordsPerPage < 1 || recordsPerPage > 300) { @@ -77,7 +59,7 @@ public Task> GetAllAsync(string userId, int .WithArgument("page_size", recordsPerPage) .WithArgument("next_page_token", pagingToken) .WithCancellationToken(cancellationToken) - .AsPaginatedResponseWithToken("webinars"); + .AsPaginatedResponseWithToken("webinars"); } /// From 06e3969f2596b5243f79ed4f61c741730ecf8d8a Mon Sep 17 00:00:00 2001 From: Jericho Date: Wed, 29 Jun 2022 20:24:48 -0400 Subject: [PATCH 3/4] Fix integration tests --- Source/ZoomNet.IntegrationTests/Tests/Meetings.cs | 1 + Source/ZoomNet.IntegrationTests/Tests/Webinars.cs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs index ce274174..1fb92a36 100644 --- a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs +++ b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs @@ -29,6 +29,7 @@ public async Task RunAsync(User myUser, string[] myPermissions, IZoomClient clie // CLEANUP PREVIOUS INTEGRATION TESTS THAT MIGHT HAVE BEEN INTERRUPTED BEFORE THEY HAD TIME TO CLEANUP AFTER THEMSELVES var cleanUpTasks = paginatedScheduledMeetings.Records .Union(paginatedLiveMeetings.Records) + .Union(paginatedUpcomingMeetings.Records) .Where(m => m.Topic.StartsWith("ZoomNet Integration Testing:")) .Select(async oldMeeting => { diff --git a/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs b/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs index 6a680eaf..1d48c530 100644 --- a/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs +++ b/Source/ZoomNet.IntegrationTests/Tests/Webinars.cs @@ -22,7 +22,6 @@ public async Task RunAsync(User myUser, string[] myPermissions, IZoomClient clie // CLEANUP PREVIOUS INTEGRATION TESTS THAT MIGHT HAVE BEEN INTERRUPTED BEFORE THEY HAD TIME TO CLEANUP AFTER THEMSELVES var cleanUpTasks = paginatedWebinars.Records - .Union(paginatedWebinars.Records) .Where(m => m.Topic.StartsWith("ZoomNet Integration Testing:")) .Select(async oldWebinar => { From 8eb0fc171200a2c936d307a5c96da77a646f44d6 Mon Sep 17 00:00:00 2001 From: Jericho Date: Wed, 29 Jun 2022 20:36:04 -0400 Subject: [PATCH 4/4] Fix XML comments --- Source/ZoomNet/Models/MeetingSummary.cs | 4 ++-- Source/ZoomNet/Resources/IMeetings.cs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/ZoomNet/Models/MeetingSummary.cs b/Source/ZoomNet/Models/MeetingSummary.cs index ff57ea86..086571a1 100644 --- a/Source/ZoomNet/Models/MeetingSummary.cs +++ b/Source/ZoomNet/Models/MeetingSummary.cs @@ -80,8 +80,8 @@ public class MeetingSummary [JsonPropertyName("type")] public MeetingType Type { get; set; } - /// G - /// ets or sets the unique id. + /// + /// Gets or sets the unique id. /// [JsonPropertyName("uuid")] public string Uuid { get; set; } diff --git a/Source/ZoomNet/Resources/IMeetings.cs b/Source/ZoomNet/Resources/IMeetings.cs index 374f12d2..71a0d0d1 100644 --- a/Source/ZoomNet/Resources/IMeetings.cs +++ b/Source/ZoomNet/Resources/IMeetings.cs @@ -45,7 +45,6 @@ public interface IMeetings /// /// To obtain the full details about a given meeting you must invoke . /// - Task> GetAllAsync(string userId, MeetingListType type = MeetingListType.Scheduled, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); ///