diff --git a/Source/ZoomNet.IntegrationTests/TestsRunner.cs b/Source/ZoomNet.IntegrationTests/TestsRunner.cs index b14f9a0f..5d024013 100644 --- a/Source/ZoomNet.IntegrationTests/TestsRunner.cs +++ b/Source/ZoomNet.IntegrationTests/TestsRunner.cs @@ -88,7 +88,8 @@ public async Task RunAsync() // { // Environment.SetEnvironmentVariable("ZOOM_OAUTH_REFRESHTOKEN", newRefreshToken, EnvironmentVariableTarget.User); // Environment.SetEnvironmentVariable("ZOOM_OAUTH_ACCESSTOKEN", newAccessToken, EnvironmentVariableTarget.User); - // }); + // }, + // null); } } diff --git a/Source/ZoomNet/Models/MeetingType.cs b/Source/ZoomNet/Models/MeetingType.cs index a7e4560a..d597cc02 100644 --- a/Source/ZoomNet/Models/MeetingType.cs +++ b/Source/ZoomNet/Models/MeetingType.cs @@ -25,6 +25,11 @@ public enum MeetingType /// Personal = 4, + /// + /// A PAC (Personal Audio Conference) meeting + /// + PersonalAudioConference = 7, + /// /// Recurring meeting with fixed time. /// diff --git a/Source/ZoomNet/Models/PastMeeting.cs b/Source/ZoomNet/Models/PastMeeting.cs index 7499e0f4..7c66db13 100644 --- a/Source/ZoomNet/Models/PastMeeting.cs +++ b/Source/ZoomNet/Models/PastMeeting.cs @@ -8,6 +8,15 @@ namespace ZoomNet.Models /// public class PastMeeting { + /// + /// Gets or sets the meeting id, also known as the meeting number. + /// + /// + /// The id. + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or sets the unique id. /// @@ -18,13 +27,25 @@ public class PastMeeting public string Uuid { get; set; } /// - /// Gets or sets the meeting id, also known as the meeting number. + /// Gets or sets the meeting duration in minutes. /// - /// - /// The id. - /// - [JsonPropertyName("id")] - public long Id { get; set; } + /// The meeting duration. + [JsonPropertyName("duration")] + public long Duration { get; set; } + + /// + /// Gets or sets the date and time when the meeting started. + /// + /// The meeting start time. + [JsonPropertyName("start_time")] + public DateTime StartedOn { get; set; } + + /// + /// Gets or sets the date and time when the meeting ended. + /// + /// The meeting end time. + [JsonPropertyName("end_time")] + public DateTime EndedOn { get; set; } /// /// Gets or sets the ID of the user who is set as the host of the meeting. @@ -36,68 +57,69 @@ public class PastMeeting public string HostId { get; set; } /// - /// Gets or sets the topic of the meeting. + /// Gets or sets the meeting host's department. /// /// - /// The topic. + /// The department. /// - [JsonPropertyName("topic")] - public string Topic { get; set; } + [JsonPropertyName("dept")] + public string Department { get; set; } /// - /// Gets or sets the meeting type. - /// - /// The meeting type. - [JsonPropertyName("type")] - public MeetingType Type { get; set; } - - /// - /// Gets or sets the user display name. + /// Gets or sets the number of participants. /// - /// The user display name. - [JsonPropertyName("user_name")] - public string UserName { get; set; } + /// The number of participants. + [JsonPropertyName("participants_count")] + public long ParticipantsCount { get; set; } /// - /// Gets or sets the user email. + /// Gets or sets the value indicating whether the meeting was created directly through Zoom or via an API request. /// - /// The user email. - [JsonPropertyName("user_email")] - public string UserEmail { get; set; } + /// + /// If the meeting was created via an OAuth app, this field returns the OAuth app's name. + /// If the meeting was created via JWT or the Zoom Web Portal, this returns the Zoom value. + /// + /// + /// The source. + /// + [JsonPropertyName("source")] + public string Source { get; set; } /// - /// Gets or sets the date and time when the meeting started. + /// Gets or sets the topic of the meeting. /// - /// The meeting start time. - [JsonPropertyName("start_time")] - public DateTime StartedOn { get; set; } + /// + /// The topic. + /// + [JsonPropertyName("topic")] + public string Topic { get; set; } /// - /// Gets or sets the date and time when the meeting ended. + /// Gets or sets the sum of meeting minutes from all participants. /// - /// The meeting end time. - [JsonPropertyName("end_time")] - public DateTime EndedOn { get; set; } + /// The total meeting minutes. + [JsonPropertyName("total_minutes")] + public long TotalMinutes { get; set; } /// - /// Gets or sets the meeting duration in minutes. + /// Gets or sets the meeting type. /// - /// The meeting duration. - [JsonPropertyName("duration")] - public long Duration { get; set; } + /// The meeting type. + [JsonPropertyName("type")] + public MeetingType Type { get; set; } /// - /// Gets or sets the sum of meeting minutes from all participants. + /// Gets or sets the user email. /// - /// The total meeting minutes. - [JsonPropertyName("total_minutes")] - public long TotalMinutes { get; set; } + /// The user email. + [JsonPropertyName("user_email")] + public string UserEmail { get; set; } /// - /// Gets or sets the number of participants. + /// Gets or sets the user display name. /// - /// The number of participants. - [JsonPropertyName("participants_count")] - public long ParticipantsCount { get; set; } + /// The user display name. + [JsonPropertyName("user_name")] + public string UserName { get; set; } } } diff --git a/Source/ZoomNet/Resources/DataCompliance.cs b/Source/ZoomNet/Resources/DataCompliance.cs index f9a2e091..31a84682 100644 --- a/Source/ZoomNet/Resources/DataCompliance.cs +++ b/Source/ZoomNet/Resources/DataCompliance.cs @@ -18,7 +18,7 @@ namespace ZoomNet.Resources /// This resource can only be used when you connect to Zoom using OAuth. It cannot be used with a Jwt connection. /// See Zoom documentation for more information. /// - [Obsolete("The Data Complaince API is deprecated")] + [Obsolete("The Data Compliance API is deprecated")] public class DataCompliance : IDataCompliance { private readonly Pathoschild.Http.Client.IClient _client; @@ -43,7 +43,7 @@ internal DataCompliance(Pathoschild.Http.Client.IClient client) /// /// The async task. /// - [Obsolete("The Data Complaince API is deprecated")] + [Obsolete("The Data Compliance API is deprecated")] public Task NotifyAsync(string userId, long accountId, AppDeauthorizedEvent deauthorizationEventReceived, CancellationToken cancellationToken = default) { // Prepare the request (but do not dispatch it yet) diff --git a/Source/ZoomNet/Resources/IPastMeetings.cs b/Source/ZoomNet/Resources/IPastMeetings.cs index d9d3269f..e2fd420e 100644 --- a/Source/ZoomNet/Resources/IPastMeetings.cs +++ b/Source/ZoomNet/Resources/IPastMeetings.cs @@ -21,7 +21,7 @@ public interface IPastMeetings /// /// The . /// - Task GetAsync(string uuid, CancellationToken cancellationToken = default); + Task GetAsync(string uuid, CancellationToken cancellationToken = default); /// /// List participants of a meeting that occured in the past. diff --git a/Source/ZoomNet/Resources/PastMeetings.cs b/Source/ZoomNet/Resources/PastMeetings.cs index 7329869c..9ecf7d33 100644 --- a/Source/ZoomNet/Resources/PastMeetings.cs +++ b/Source/ZoomNet/Resources/PastMeetings.cs @@ -34,12 +34,12 @@ internal PastMeetings(Pathoschild.Http.Client.IClient client) /// /// The . /// - public Task GetAsync(string uuid, CancellationToken cancellationToken = default) + public Task GetAsync(string uuid, CancellationToken cancellationToken = default) { return _client .GetAsync($"past_meetings/{uuid}") .WithCancellationToken(cancellationToken) - .AsObject(); + .AsObject(); } /// diff --git a/Source/ZoomNet/Utilities/DiagnosticHandler.cs b/Source/ZoomNet/Utilities/DiagnosticHandler.cs index ca1c17f6..c585bcde 100644 --- a/Source/ZoomNet/Utilities/DiagnosticHandler.cs +++ b/Source/ZoomNet/Utilities/DiagnosticHandler.cs @@ -167,7 +167,7 @@ private void LogContent(StringBuilder diagnostic, HttpContent httpContent) if (contentLength > 0) { diagnostic.AppendLine(); - diagnostic.AppendLine(httpContent.ReadAsStringAsync(null).GetAwaiter().GetResult() ?? ""); + diagnostic.AppendLine(httpContent.ReadAsStringAsync(null).ConfigureAwait(false).GetAwaiter().GetResult() ?? ""); } } } diff --git a/Source/ZoomNet/Utilities/OAuthTokenHandler.cs b/Source/ZoomNet/Utilities/OAuthTokenHandler.cs index c47fda7b..ebc0ab3c 100644 --- a/Source/ZoomNet/Utilities/OAuthTokenHandler.cs +++ b/Source/ZoomNet/Utilities/OAuthTokenHandler.cs @@ -92,7 +92,7 @@ public string RefreshTokenIfNecessary(bool forceRefresh) var requestTime = DateTime.UtcNow; var request = new HttpRequestMessage(HttpMethod.Post, requestUrl); request.Headers.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{_connectionInfo.ClientId}:{_connectionInfo.ClientSecret}"))); - var response = _httpClient.SendAsync(request).GetAwaiter().GetResult(); + var response = _httpClient.SendAsync(request).ConfigureAwait(false).GetAwaiter().GetResult(); var responseContent = response.Content.ReadAsStringAsync(null).ConfigureAwait(false).GetAwaiter().GetResult(); if (string.IsNullOrEmpty(responseContent)) throw new Exception(response.ReasonPhrase); diff --git a/Source/ZoomNet/Utilities/ZoomErrorHandler.cs b/Source/ZoomNet/Utilities/ZoomErrorHandler.cs index 82e075c0..6fac193b 100644 --- a/Source/ZoomNet/Utilities/ZoomErrorHandler.cs +++ b/Source/ZoomNet/Utilities/ZoomErrorHandler.cs @@ -50,7 +50,7 @@ public void OnRequest(IRequest request) { } /// Whether HTTP error responses should be raised as exceptions. public void OnResponse(IResponse response, bool httpErrorAsException) { - var (isError, errorMessage, errorCode) = response.Message.GetErrorMessageAsync().GetAwaiter().GetResult(); + var (isError, errorMessage, errorCode) = response.Message.GetErrorMessageAsync().ConfigureAwait(false).GetAwaiter().GetResult(); var diagnosticInfo = response.GetDiagnosticInfo(); var diagnosticLog = diagnosticInfo.Diagnostic ?? "Diagnostic log unavailable"; diff --git a/build.cake b/build.cake index c99f4937..e7aa7c44 100644 --- a/build.cake +++ b/build.cake @@ -3,7 +3,7 @@ #tool dotnet:?package=coveralls.net&version=4.0.0 #tool nuget:?package=GitReleaseManager&version=0.13.0 #tool nuget:?package=ReportGenerator&version=5.1.9 -#tool nuget:?package=xunit.runner.console&version=2.4.1 +#tool nuget:?package=xunit.runner.console&version=2.4.2 #tool nuget:?package=Codecov&version=1.13.0 // Install addins. @@ -299,17 +299,17 @@ Task("Upload-Coverage-Result") .IsDependentOn("Run-Code-Coverage") .Does(() => { - try - { - CoverallsNet(new FilePath($"{codeCoverageDir}coverage.{DefaultFramework}.xml"), CoverallsNetReportType.OpenCover, new CoverallsNetSettings() - { - RepoToken = coverallsToken - }); - } - catch (Exception e) - { - Warning(e.Message); - } + //try + //{ + // CoverallsNet(new FilePath($"{codeCoverageDir}coverage.{DefaultFramework}.xml"), CoverallsNetReportType.OpenCover, new CoverallsNetSettings() + // { + // RepoToken = coverallsToken + // }); + //} + //catch (Exception e) + //{ + // Warning(e.Message); + //} try {