Skip to content

Commit

Permalink
Merge branch 'release/0.62.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed May 13, 2023
2 parents d4295a4 + d474dc3 commit 2ba5a66
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 142 deletions.
2 changes: 0 additions & 2 deletions Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ namespace ZoomNet.Json
[JsonSerializable(typeof(ZoomNet.Models.RegistrationType))]
[JsonSerializable(typeof(ZoomNet.Models.ReportHost))]
[JsonSerializable(typeof(ZoomNet.Models.ReportHostType))]
[JsonSerializable(typeof(ZoomNet.Models.ReportMeetingParticipant))]
[JsonSerializable(typeof(ZoomNet.Models.ReportMeetingType))]
[JsonSerializable(typeof(ZoomNet.Models.ReportParticipant))]
[JsonSerializable(typeof(ZoomNet.Models.Role))]
Expand Down Expand Up @@ -394,7 +393,6 @@ namespace ZoomNet.Json
[JsonSerializable(typeof(ZoomNet.Models.RegistrationType[]))]
[JsonSerializable(typeof(ZoomNet.Models.ReportHost[]))]
[JsonSerializable(typeof(ZoomNet.Models.ReportHostType[]))]
[JsonSerializable(typeof(ZoomNet.Models.ReportMeetingParticipant[]))]
[JsonSerializable(typeof(ZoomNet.Models.ReportMeetingType[]))]
[JsonSerializable(typeof(ZoomNet.Models.ReportParticipant[]))]
[JsonSerializable(typeof(ZoomNet.Models.Role[]))]
Expand Down
76 changes: 71 additions & 5 deletions Source/ZoomNet/Models/Participant.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Text.Json.Serialization;

namespace ZoomNet.Models
Expand All @@ -8,7 +9,9 @@ namespace ZoomNet.Models
public class Participant
{
/// <summary>
/// Gets or sets the participant uuid.
/// Gets or sets the universal 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.
/// </summary>
/// <value>
/// The id.
Expand All @@ -17,15 +20,78 @@ public class Participant
public string Uuid { get; set; }

/// <summary>
/// Gets or sets the participant's email address.
/// Gets or sets the participant's display name.
/// </summary>
[JsonPropertyName("name")]
public string DisplayName { get; set; }

/// <summary>
/// Gets or sets the participant's ID.
/// This is a unique ID assigned to the participant joining a meeting and is valid for that meeting only.
/// </summary>
/// <value>
/// The participant ID.
/// </value>
[JsonPropertyName("user_id")]
public string UserId { get; set; }

/// <summary>
/// Gets or sets the participant's unique registrant ID.
/// This field only returns if you pass the registrant_id value for the include_fields query parameter.
/// </summary>
/// <remarks>This field does not return if the type query parameter is the live value.</remarks>
[JsonPropertyName("registrant_id")]
public string RegistrantId { get; set; }

/// <summary>
/// Gets or sets the email address of the user.
/// If the participant is not part of the host's account, this returns an empty string value, with some exceptions.
/// See Email address display rules for details.
/// </summary>
[JsonPropertyName("user_email")]
public string Email { get; set; }

/// <summary>
/// Gets or sets the participant's display name.
/// Gets or sets the participant's join time.
/// </summary>
[JsonPropertyName("name")]
public string DisplayName { get; set; }
/// <value>
/// The time at which participant joined the meeting.
/// </value>
[JsonPropertyName("join_time")]
public DateTime? JoinTime { get; set; }

/// <summary>
/// Gets or sets the participant's leave time.
/// </summary>
/// <value>
/// 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.
/// </value>
[JsonPropertyName("leave_time")]
public DateTime? LeaveTime { get; set; }

/// <summary>
/// Gets or sets the participant's duration.
/// </summary>
/// <value>
/// Indicates how long a participant has participated.
/// </value>
[JsonPropertyName("duration")]
public int? Duration { get; set; }

/// <summary>
/// Gets or sets a value indicating whether happened during the meeting.
/// </summary>
/// <value>
/// Indicates whether or not failover occurred during the meeting.
/// </value>
[JsonPropertyName("failover")]
public bool? Failover { get; set; }

/// <summary>
/// Gets or sets the participant's status.
/// </summary>
[JsonPropertyName("status")]
public ParticipantStatus? Status { get; set; }
}
}
19 changes: 0 additions & 19 deletions Source/ZoomNet/Models/ReportMeetingParticipant.cs

This file was deleted.

49 changes: 2 additions & 47 deletions Source/ZoomNet/Models/ReportParticipant.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Text.Json.Serialization;

namespace ZoomNet.Models
Expand All @@ -8,58 +7,14 @@ namespace ZoomNet.Models
/// </summary>
public class ReportParticipant : Participant
{
/// <summary>
/// Gets or sets the participant ID.
/// </summary>
/// <value>
/// The participant ID.
/// </value>
[JsonPropertyName("user_id")]
public string UserId { get; set; }

/// <summary>
/// Gets or sets the time at which participant joined the meeting.
/// </summary>
/// <value>
/// The time at which participant joined the meeting.
/// </value>
[JsonPropertyName("join_time")]
public DateTime JoinTime { get; set; }

/// <summary>
/// Gets or sets the time at which a participant left the meeting.
/// </summary>
/// <value>
/// 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.
/// </value>
[JsonPropertyName("leave_time")]
public DateTime? LeaveTime { get; set; }

/// <summary>
/// Gets or sets a value of the duration the participant.
/// </summary>
/// <value>
/// Indicates how long a participant has participated.
/// </value>
[JsonPropertyName("duration")]
public int? Duration { get; set; }

/// <summary>
/// Gets or sets the CustomerKey of the participant.
/// </summary>
/// <value>
/// The CustomerKey of the participant. This is another identifier with a max length of 15 characters.
/// The CustomerKey of the participant.
/// This is another identifier with a max length of 15 characters.
/// </value>
[JsonPropertyName("customer_key")]
public string CustomerKey { get; set; }

/// <summary>
/// Gets or sets a value indicating whether a failover occurred during the meeting.
/// </summary>
/// <value>
/// Indicates whether or not failover occurred during the meeting.
/// </value>
[JsonPropertyName("failover")]
public bool Failover { get; set; }
}
}
19 changes: 0 additions & 19 deletions Source/ZoomNet/Models/ReportWebinarParticipant.cs

This file was deleted.

11 changes: 6 additions & 5 deletions Source/ZoomNet/Resources/IPastMeetings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ public interface IPastMeetings
/// <summary>
/// Retrieve the details of a meeting that occured in the past.
/// </summary>
/// <param name="uuid">The meeting UUID.</param>
/// <param name="meetingId">The meeting's ID or universally unique ID (UUID).</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The <see cref="Meeting" />.
/// </returns>
Task<PastMeeting> GetAsync(string uuid, CancellationToken cancellationToken = default);
Task<PastMeeting> GetAsync(string meetingId, CancellationToken cancellationToken = default);

/// <summary>
/// List participants of a meeting that occured in the past.
/// Retrieve information on participants from a past meeting.
/// </summary>
/// <param name="uuid">The meeting UUID.</param>
/// <remarks>The API doesn't return results if there's only one participant in a meeting.</remarks>
/// <param name="meetingId">The meeting's ID or universally unique ID (UUID).</param>
/// <param name="recordsPerPage">The number of records to return.</param>
/// <param name="pagingToken">The paging token.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Participant" />.
/// </returns>
Task<PaginatedResponseWithToken<Participant>> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default);
Task<PaginatedResponseWithToken<Participant>> GetParticipantsAsync(string meetingId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default);

/// <summary>
/// Get a list of ended meeting instance.
Expand Down
8 changes: 4 additions & 4 deletions Source/ZoomNet/Resources/IReports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public interface IReports
/// </param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="ReportMeetingParticipant">participants</see>.
/// An array of <see cref="ReportParticipant">participants</see>.
/// </returns>
Task<PaginatedResponseWithToken<ReportMeetingParticipant>> GetMeetingParticipantsAsync(string meetingId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default);
Task<PaginatedResponseWithToken<ReportParticipant>> GetMeetingParticipantsAsync(string meetingId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default);

/// <summary>
/// Get a list past meetings and webinars for a specified time period. The time range for the report is limited to a month and the month must fall within the past six months.
Expand Down Expand Up @@ -60,9 +60,9 @@ public interface IReports
/// </param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="ReportWebinarParticipant">participants</see>.
/// An array of <see cref="ReportParticipant">participants</see>.
/// </returns>
Task<PaginatedResponseWithToken<ReportWebinarParticipant>> GetWebinarParticipantsAsync(string webinarId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default);
Task<PaginatedResponseWithToken<ReportParticipant>> GetWebinarParticipantsAsync(string webinarId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default);

/// <summary>
/// Gets active/inactive host reports.
Expand Down
28 changes: 6 additions & 22 deletions Source/ZoomNet/Resources/PastMeetings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,25 @@ internal PastMeetings(Pathoschild.Http.Client.IClient client)
_client = client;
}

/// <summary>
/// Retrieve the details of a meeting that occured in the past.
/// </summary>
/// <param name="uuid">The meeting UUID.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The <see cref="Meeting" />.
/// </returns>
public Task<PastMeeting> GetAsync(string uuid, CancellationToken cancellationToken = default)
/// <inheritdoc/>
public Task<PastMeeting> GetAsync(string meetingId, CancellationToken cancellationToken = default)
{
return _client
.GetAsync($"past_meetings/{uuid}")
.GetAsync($"past_meetings/{meetingId}")
.WithCancellationToken(cancellationToken)
.AsObject<PastMeeting>();
}

/// <summary>
/// List participants of a meeting that occured in the past.
/// </summary>
/// <param name="uuid">The meeting UUID.</param>
/// <param name="recordsPerPage">The number of records to return.</param>
/// <param name="pagingToken">The paging token.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Participant" />.
/// </returns>
public Task<PaginatedResponseWithToken<Participant>> GetParticipantsAsync(string uuid, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default)
/// <inheritdoc/>
public Task<PaginatedResponseWithToken<Participant>> GetParticipantsAsync(string meetingId, 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($"past_meetings/{uuid}/participants")
.GetAsync($"past_meetings/{meetingId}/participants")
.WithArgument("page_size", recordsPerPage)
.WithArgument("next_page_token", pagingToken)
.WithCancellationToken(cancellationToken)
Expand Down
23 changes: 5 additions & 18 deletions Source/ZoomNet/Resources/Reports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,8 @@ internal Reports(IClient client)
_client = client;
}

/// <summary>
/// Get a list of participants from past meetings with two or more participants. To see a list of participants for meetings with one participant use Dashboards.GetMeetingParticipantsAsync.
/// </summary>
/// <param name="meetingId">The meeting ID or meeting UUID. If given the meeting ID it will take the last meeting instance.</param>
/// <param name="pageSize">The number of records returned within a single API call.</param>
/// <param name="pageToken">
/// 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.
/// </param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="ReportParticipant">participants</see>.
/// </returns>
public Task<PaginatedResponseWithToken<ReportMeetingParticipant>> GetMeetingParticipantsAsync(string meetingId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default)
/// <inheritdoc/>
public Task<PaginatedResponseWithToken<ReportParticipant>> GetMeetingParticipantsAsync(string meetingId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default)
{
VerifyPageSize(pageSize);

Expand All @@ -49,7 +36,7 @@ public Task<PaginatedResponseWithToken<ReportMeetingParticipant>> GetMeetingPart
.WithArgument("page_size", pageSize)
.WithArgument("next_page_token", pageToken)
.WithCancellationToken(cancellationToken)
.AsPaginatedResponseWithToken<ReportMeetingParticipant>("participants");
.AsPaginatedResponseWithToken<ReportParticipant>("participants");
}

/// <inheritdoc/>
Expand All @@ -70,7 +57,7 @@ public Task<PaginatedResponseWithToken<PastMeeting>> GetMeetingsAsync(string use
}

/// <inheritdoc/>
public Task<PaginatedResponseWithToken<ReportWebinarParticipant>> GetWebinarParticipantsAsync(string webinarId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default)
public Task<PaginatedResponseWithToken<ReportParticipant>> GetWebinarParticipantsAsync(string webinarId, int pageSize = 30, string pageToken = null, CancellationToken cancellationToken = default)
{
VerifyPageSize(pageSize);

Expand All @@ -80,7 +67,7 @@ public Task<PaginatedResponseWithToken<ReportWebinarParticipant>> GetWebinarPart
.WithArgument("page_size", pageSize)
.WithArgument("next_page_token", pageToken)
.WithCancellationToken(cancellationToken)
.AsPaginatedResponseWithToken<ReportWebinarParticipant>("participants");
.AsPaginatedResponseWithToken<ReportParticipant>("participants");
}

/// <inheritdoc/>
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#tool dotnet:?package=GitVersion.Tool&version=5.12.0
#tool dotnet:?package=coveralls.net&version=4.0.1
#tool nuget:?package=GitReleaseManager&version=0.13.0
#tool nuget:?package=ReportGenerator&version=5.1.19
#tool nuget:?package=ReportGenerator&version=5.1.20
#tool nuget:?package=xunit.runner.console&version=2.4.2
#tool nuget:?package=Codecov&version=1.13.0

Expand Down

0 comments on commit 2ba5a66

Please sign in to comment.