Skip to content

Commit

Permalink
Merge branch 'release/0.10.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Nov 22, 2020
2 parents acee9ce + 14273de commit 76a0895
Show file tree
Hide file tree
Showing 14 changed files with 1,067 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Source/ZoomNet.IntegrationTests/Tests/CloudRecordings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;

namespace ZoomNet.IntegrationTests.Tests
{
public class CloudRecordings : IIntegrationTest
{
public async Task RunAsync(string userId, IZoomClient client, TextWriter log, CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested) return;

await log.WriteLineAsync("\n***** CLOUD RECORDINGS *****\n").ConfigureAwait(false);

// GET ALL THE RECORDINGS FOR A GIVEN USER
var paginatedRecordings = await client.CloudRecordings.GetRecordingsForUserAsync(userId, false, null, null, 100, null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"User {userId} has {paginatedRecordings.TotalRecords} recordings stored in the cloud").ConfigureAwait(false);
}
}
}
1 change: 1 addition & 0 deletions Source/ZoomNet.IntegrationTests/TestsRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public async Task<int> RunAsync()
// These are the integration tests that we will execute
var integrationTests = new Type[]
{
typeof(CloudRecordings),
typeof(Dashboards),
typeof(Meetings),
typeof(Users),
Expand Down
8 changes: 8 additions & 0 deletions Source/ZoomNet/IZoomClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ namespace ZoomNet
/// </summary>
public interface IZoomClient
{
/// <summary>
/// Gets the resource which allows you to manage cloud recordings.
/// </summary>
/// <value>
/// The cloud recordings resource.
/// </value>
ICloudRecordings CloudRecordings { get; }

/// <summary>
/// Gets the resource which allows you to manage meetings.
/// </summary>
Expand Down
60 changes: 60 additions & 0 deletions Source/ZoomNet/Models/Recording.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using Newtonsoft.Json;
using System;

namespace ZoomNet.Models
{
/// <summary>
/// A recording.
/// </summary>
public class Recording
{
/// <summary>Gets or sets the unique id.</summary>
/// <value>The unique id.</value>
[JsonProperty("uuid", NullValueHandling = NullValueHandling.Ignore)]
public string Uuid { get; set; }

/// <summary>Gets or sets the recording id.</summary>
/// <value>The id.</value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public long Id { get; set; }

/// <summary>Gets or sets the ID of the user account.</summary>
/// <value>The account id.</value>
[JsonProperty("account_id", NullValueHandling = NullValueHandling.Ignore)]
public string AccountId { get; set; }

/// <summary>Gets or sets the ID of the user who is set as the host of the meeting.</summary>
/// <value>The user id.</value>
[JsonProperty("host_id", NullValueHandling = NullValueHandling.Ignore)]
public string HostId { get; set; }

/// <summary>Gets or sets the topic of the meeting.</summary>
/// <value>The topic.</value>
[JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)]
public string Topic { get; set; }

/// <summary>Gets or sets the date and time when the meeting started.</summary>
/// <value>The start time.</value>
[JsonProperty(PropertyName = "start_time", NullValueHandling = NullValueHandling.Ignore)]
public DateTime StartTime { get; set; }

/// <summary>Gets or sets the meeting duration.</summary>
/// <value> The duration.</value>
[JsonProperty("duration", NullValueHandling = NullValueHandling.Ignore)]
public long Duration { get; set; }

/// <summary>Gets or sets the total size of the recording.</summary>
/// <value>The total size.</value>
[JsonProperty(PropertyName = "total_size", NullValueHandling = NullValueHandling.Ignore)]
public long TotalSize { get; set; }

/// <summary>Gets or sets the number of files.</summary>
/// <value>The number of files.</value>
[JsonProperty(PropertyName = "recording_count", NullValueHandling = NullValueHandling.Ignore)]
public long FilesCount { get; set; }

/// <summary>Gets or sets the recording files.</summary>
[JsonProperty(PropertyName = "recording_files", NullValueHandling = NullValueHandling.Ignore)]
public RecordingFile[] RecordingFiles { get; set; }
}
}
57 changes: 57 additions & 0 deletions Source/ZoomNet/Models/RecordingContentType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Serialization;

namespace ZoomNet.Models
{
/// <summary>
/// Enumeration to indicate the type of content in a recording file.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum RecordingContentType
{
/// <summary>Shared screen with speaker view closed captioned.</summary>
[EnumMember(Value = "shared_screen_with_speaker_view(CC)")]
SharedScreenWithSpeakerViewClosedCaptioned,

/// <summary>Shared screen with speaker view.</summary>
[EnumMember(Value = "shared_screen_with_speaker_view")]
SharedScreenWithSpeakerView,

/// <summary>Shared screen with gallery view.</summary>
[EnumMember(Value = "shared_screen_with_gallery_view")]
SharedScreenWithGalleryView,

/// <summary>Speaker view.</summary>
[EnumMember(Value = "speaker_view")]
SpeakerView,

/// <summary>Gallery view.</summary>
[EnumMember(Value = "gallery_view")]
GalleryView,

/// <summary>Shared screen.</summary>
[EnumMember(Value = "shared_screen")]
SharedScreen,

/// <summary>Audio only.</summary>
[EnumMember(Value = "audio_only")]
AudioOnly,

/// <summary>Audio transcript.</summary>
[EnumMember(Value = "audio_transcript")]
AudioTranscript,

/// <summary>Chat file.</summary>
[EnumMember(Value = "chat_file")]
ChatFile,

/// <summary>timeline.</summary>
[EnumMember(Value = "timeline")]
Timeline,

/// <summary>Active speaker.</summary>
[EnumMember(Value = "active_speaker")]
ActiveSpeaker
}
}
67 changes: 67 additions & 0 deletions Source/ZoomNet/Models/RecordingFile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using Newtonsoft.Json;
using System;

namespace ZoomNet.Models
{
/// <summary>
/// A recording file.
/// </summary>
public class RecordingFile
{
/// <summary>Gets or sets the recording file id.</summary>
/// <value>The id.</value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public long Id { get; set; }

/// <summary>Gets or sets the ID of the meeting.</summary>
/// <value>The meeting id.</value>
[JsonProperty("meeting_id", NullValueHandling = NullValueHandling.Ignore)]
public long MeetingId { get; set; }

/// <summary>Gets or sets the date and time when the recording started.</summary>
/// <value>The start time.</value>
[JsonProperty(PropertyName = "recording_start", NullValueHandling = NullValueHandling.Ignore)]
public DateTime StartTime { get; set; }

/// <summary>Gets or sets the date and time when the recording ended.</summary>
/// <value>The end time.</value>
[JsonProperty(PropertyName = "recording_end", NullValueHandling = NullValueHandling.Ignore)]
public DateTime EndTime { get; set; }

/// <summary>Gets or sets the file type.</summary>
/// <value>The file type.</value>
[JsonProperty("file_type", NullValueHandling = NullValueHandling.Ignore)]
public RecordingFileType FileType { get; set; }

/// <summary>Gets or sets the size of the file.</summary>
/// <value>The size.</value>
[JsonProperty(PropertyName = "file_size", NullValueHandling = NullValueHandling.Ignore)]
public long Size { get; set; }

/// <summary>Gets or sets the URL which can be used to play the file.</summary>
/// <value>The play URL.</value>
[JsonProperty(PropertyName = "play_url", NullValueHandling = NullValueHandling.Ignore)]
public string PlayUrl { get; set; }

/// <summary>Gets or sets the URL which can be used to download the file.</summary>
/// <value>The download URL.</value>
[JsonProperty(PropertyName = "download_url", NullValueHandling = NullValueHandling.Ignore)]
public string DownloadUrl { get; set; }

/// <summary>Gets or sets the recording status.</summary>
/// <value>The status.</value>
[JsonProperty(PropertyName = "status", NullValueHandling = NullValueHandling.Ignore)]
public string Status { get; set; }

/// <summary>Gets or sets the date and time when the recording was deleted.</summary>
/// <value>The delete time.</value>
/// <remarks>Returned in the response only for trash query.</remarks>
[JsonProperty(PropertyName = "deleted_time", NullValueHandling = NullValueHandling.Ignore)]
public DateTime? DeleteTime { get; set; }

/// <summary>Gets or sets the content type.</summary>
/// <value>The content type.</value>
[JsonProperty("recording_type", NullValueHandling = NullValueHandling.Ignore)]
public RecordingContentType ContentType { get; set; }
}
}
38 changes: 38 additions & 0 deletions Source/ZoomNet/Models/RecordingFileType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Serialization;

namespace ZoomNet.Models
{
/// <summary>
/// Enumeration to indicate the type of recording file.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum RecordingFileType
{
/// <summary>Video.</summary>
[EnumMember(Value = "mp4")]
Video,

/// <summary>Audio only.</summary>
[EnumMember(Value = "m4a")]
Audio,

/// <summary>Timestamp file of the recording in JSON format.</summary>
/// <remarks>To get a timeline file, the 'Add timestamp to the recording' setting must be enabled.</remarks>
[EnumMember(Value = "timeline")]
Timeline,

/// <summary>Transcription of the recording in VTT format.</summary>
[EnumMember(Value = "transcript")]
Transcript,

/// <summary>A text file containing in-meeting chat messages that were sent during the meeting.</summary>
[EnumMember(Value = "chat")]
Chat,

/// <summary>File contains closed captions of the recording in VTT file format.</summary>
[EnumMember(Value = "cc")]
ClosedCaptioning
}
}
30 changes: 30 additions & 0 deletions Source/ZoomNet/Models/RecordingRegistration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Newtonsoft.Json;

namespace ZoomNet.Models
{
/// <summary>
/// A registration for a recording.
/// </summary>
public class RecordingRegistration
{
/// <summary>Gets or sets the registrant id.</summary>
/// <value>The registrant id.</value>
[JsonProperty("registrant_id", NullValueHandling = NullValueHandling.Ignore)]
public string RegistrantId { get; set; }

/// <summary>Gets or sets the meeting id.</summary>
/// <value>The meeting id.</value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public long MeetingId { get; set; }

/// <summary>Gets or sets the meeting topic.</summary>
/// <value>The topic.</value>
[JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)]
public string Topic { get; set; }

/// <summary>Gets or sets the URL for the on-demand recording.</summary>
/// <value>The user id.</value>
[JsonProperty("share_url", NullValueHandling = NullValueHandling.Ignore)]
public string ShareUrl { get; set; }
}
}
64 changes: 64 additions & 0 deletions Source/ZoomNet/Models/RecordingSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using Newtonsoft.Json;

namespace ZoomNet.Models
{
/// <summary>
/// Meeting recording settings.
/// </summary>
public class RecordingSettings
{
/// <summary>
/// Gets or sets the value indicating how the meeting recording is shared.
/// </summary>
[JsonProperty(PropertyName = "share_recording")]
public RecordingSharingType SharingType { get; set; }

/// <summary>
/// Gets or sets a value indicating whether gets or sets the value indicating whether only authenticated user can view the recording.
/// </summary>
[JsonProperty(PropertyName = "recording_authentication")]
public bool RequiresAuthentication { get; set; }

/// <summary>
/// Gets or sets the authentication options.
/// </summary>
[JsonProperty(PropertyName = "authentication_option")]
public string AuthenticationOptions { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the recording can be downloaded.
/// </summary>
[JsonProperty(PropertyName = "viewer_download")]
public bool AllowDownload { get; set; }

/// <summary>
/// Gets or sets the password.
/// </summary>
[JsonProperty(PropertyName = "password")]
public string Password { get; set; }

/// <summary>
/// Gets or sets a value indicating whether registration is required to view the recording.
/// </summary>
[JsonProperty(PropertyName = "on_demand")]
public bool RegistrationRequired { get; set; }

/// <summary>
/// Gets or sets the approval type for the registration.
/// </summary>
[JsonProperty(PropertyName = "approval_type")]
public MeetingApprovalType RegistrationApprovalType { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to send an email to the host when someone registers to view the recording.
/// </summary>
[JsonProperty(PropertyName = "send_email_to_host")]
public bool NotifyHost { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to show social share buttons on registration page.
/// </summary>
[JsonProperty(PropertyName = "show_social_share_buttons")]
public bool ShowSocialShareButtons { get; set; }
}
}
31 changes: 31 additions & 0 deletions Source/ZoomNet/Models/RecordingSharingType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Serialization;

namespace ZoomNet.Models
{
/// <summary>
/// Enumeration to indicate the type of audio available to attendees.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum RecordingSharingType
{
/// <summary>
/// Publicly.
/// </summary>
[EnumMember(Value = "publicly")]
Publicly,

/// <summary>
/// Internally.
/// </summary>
[EnumMember(Value = "internally")]
Internally,

/// <summary>
/// None.
/// </summary>
[EnumMember(Value = "none")]
None
}
}
Loading

0 comments on commit 76a0895

Please sign in to comment.