Skip to content

Commit

Permalink
Merge branch 'release/0.21.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Feb 18, 2021
2 parents de37f30 + 0fd698e commit 77fddd0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Source/ZoomNet/Models/Meeting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public abstract class Meeting
/// The status.
/// </value>
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
public MeetingStatus Status { get; set; }
public MeetingStatus? Status { get; set; }

/// <summary>
/// Gets or sets the meeting description.
Expand Down
45 changes: 4 additions & 41 deletions Source/ZoomNet/Resources/CloudRecordings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,54 +95,17 @@ public Task<PaginatedResponseWithTokenAndDateRange<Recording>> GetRecordingsForU
}

/// <summary>
/// Retrieve all cloud recordings for a meeting.
/// Retrieve all cloud recordings for a meeting or webinar.
/// </summary>
/// <param name="meetingId">The meeting Id or UUID.</param>
/// <param name="recordsPerPage">The number of records returned within a single API call.</param>
/// <param name="page">The current page number of returned records.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Recording">recordings</see>.
/// </returns>
[Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")]
public Task<PaginatedResponse<Recording>> GetRecordingsAsync(string meetingId, int recordsPerPage = 30, int page = 1, 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}/recordings")
.WithArgument("page_size", recordsPerPage)
.WithArgument("page", page)
.WithCancellationToken(cancellationToken)
.AsPaginatedResponse<Recording>("meetings");
}

/// <summary>
/// Retrieve all cloud recordings for a user.
/// </summary>
/// <param name="meetingId">The meeting Id or UUID.</param>
/// <param name="recordsPerPage">The number of records returned within a single API call.</param>
/// <param name="pagingToken">The paging token.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Recording">recordings</see>.
/// </returns>
public Task<PaginatedResponseWithToken<Recording>> GetRecordingsAsync(string meetingId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default)
/// <returns>Details of recordings made for a particular meeding or webinar.</returns>
public Task<Recording> GetRecordingsAsync(string meetingId, 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}/recordings")
.WithArgument("page_size", recordsPerPage)
.WithArgument("next_page_token", pagingToken)
.WithCancellationToken(cancellationToken)
.AsPaginatedResponseWithToken<Recording>("meetings");
.AsObject<Recording>();
}

/// <summary>
Expand Down
23 changes: 3 additions & 20 deletions Source/ZoomNet/Resources/ICloudRecordings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,12 @@ public interface ICloudRecordings
Task<PaginatedResponseWithTokenAndDateRange<Recording>> GetRecordingsForUserAsync(string userId, bool queryTrash = false, DateTime? from = null, DateTime? to = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieve all cloud recordings for a meeting.
/// Retrieve all cloud recordings for a meeting or webinar.
/// </summary>
/// <param name="meetingId">The meeting Id or UUID.</param>
/// <param name="recordsPerPage">The number of records returned within a single API call.</param>
/// <param name="page">The current page number of returned records.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Recording">recordings</see>.
/// </returns>
[Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")]
Task<PaginatedResponse<Recording>> GetRecordingsAsync(string meetingId, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieve all cloud recordings for a meeting.
/// </summary>
/// <param name="meetingId">The meeting Id or UUID.</param>
/// <param name="recordsPerPage">The number of records returned within a single API call.</param>
/// <param name="pagingToken">The paging token.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// An array of <see cref="Recording">recordings</see>.
/// </returns>
Task<PaginatedResponseWithToken<Recording>> GetRecordingsAsync(string meetingId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default);
/// <returns>Details of recordings made for a particular meeding or webinar.</returns>
Task<Recording> GetRecordingsAsync(string meetingId, CancellationToken cancellationToken = default);

/// <summary>
/// Move recording files for a meeting to trash.
Expand Down
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Install tools.
#tool nuget:?package=GitVersion.CommandLine&version=5.6.0
#tool nuget:?package=GitVersion.CommandLine&version=5.6.6
#tool nuget:?package=GitReleaseManager&version=0.11.0
#tool nuget:?package=OpenCover&version=4.7.922
#tool nuget:?package=ReportGenerator&version=4.8.4
#tool nuget:?package=ReportGenerator&version=4.8.5
#tool nuget:?package=coveralls.io&version=1.4.2
#tool nuget:?package=xunit.runner.console&version=2.4.1

Expand Down
5 changes: 5 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ function MD5HashFile([string] $filePath)
{
$file.Dispose()
}

if ($md5 -ne $null)
{
$md5.Dispose()
}
}
}

Expand Down

0 comments on commit 77fddd0

Please sign in to comment.