-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
129 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,24 +32,44 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca | |
// GET MY USER | ||
var myUser = await client.Users.GetCurrentAsync(cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync($"My user retrieved. My email address is {myUser.Email}").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// GET MY ASSISTANTS | ||
var myAssistants = await client.Users.GetAssistantsAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync($"My user has {myAssistants.Length} assistants").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// GET MY SCHEDULERS | ||
var mySchedulers = await client.Users.GetSchedulersAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync($"My user has {mySchedulers.Length} schedulers").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// GET MY SETTINGS | ||
var mySettings = await client.Users.GetSettingsAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync("My settings retrieved").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
var myMeetingAuthSettings = await client.Users.GetMeetingAuthenticationSettingsAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync("My meeting settings retrieved").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
var myRecordingAuthSettings = await client.Users.GetRecordingAuthenticationSettingsAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync("My settings retrieved").ConfigureAwait(false); | ||
await log.WriteLineAsync("My recording authentication settings retrieved").ConfigureAwait(false); | ||
await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// GET MY PERMISSIONS | ||
var myPermissions = await client.Users.GetPermissionsAsync(myUser.Id, cancellationToken).ConfigureAwait(false); | ||
await log.WriteLineAsync($"My permissions retrieved: I have been granted {myPermissions.Length} permissions").ConfigureAwait(false); | ||
//await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// CREATE NEW USER (commenting out this integration test because I currently do not have permission to create users) | ||
//var newUser = await client.Users.CreateAsync("[email protected]", "ZoomNet", "Integration Testing", UserType.Basic, UserCreateType.Normal, cancellationToken).ConfigureAwait(false); | ||
//await log.WriteLineAsync($"New user created: {newUser.Id}").ConfigureAwait(false); | ||
//await Task.Delay(500, cancellationToken).ConfigureAwait(false); | ||
|
||
// DELETE USER | ||
//await client.Users.DeleteAsync(newUser.Id, null, false, false, false, cancellationToken).ConfigureAwait(false); | ||
//await log.WriteLineAsync($"User {newUser.Id} deleted").ConfigureAwait(false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ZoomNet.Models | ||
{ | ||
/// <summary> | ||
/// Details of a webinar template. | ||
/// </summary> | ||
public class Template | ||
{ | ||
/// <summary> | ||
/// Gets or sets the Id of the template. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "id")] | ||
public string Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Name of the template. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "name")] | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Runtime.Serialization; | ||
|
||
namespace ZoomNet.Models | ||
{ | ||
/// <summary> | ||
/// Enumeration to specify how to create a new user. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum UserCreateType | ||
{ | ||
/// <summary> | ||
/// User will get an email sent from Zoom. | ||
/// There is a confirmation link in this email. | ||
/// User will then need to click this link to activate their account to the Zoom service. | ||
/// The user can set or change their password in Zoom. | ||
/// </summary> | ||
[EnumMember(Value = "create")] | ||
Normal, | ||
|
||
/// <summary> | ||
/// This action is provided for enterprise customer who has a managed domain. | ||
/// This feature is disabled by default because of the security risk involved in creating a user who does not belong to your domain without notifying the user. | ||
/// </summary> | ||
[EnumMember(Value = "autoCreate")] | ||
Auto, | ||
|
||
/// <summary> | ||
/// This action is provided for API partner only. | ||
/// User created in this way has no password and is not able to log into the Zoom web site or client. | ||
/// </summary> | ||
[EnumMember(Value = "custCreate")] | ||
Cust, | ||
|
||
/// <summary> | ||
/// This action is provided for enabled "Pre-provisioning SSO User" option. | ||
/// User created in this way has no password. | ||
/// If it is not a basic user, will generate a Personal Vanity URL using user name (no domain) of the provisioning email. | ||
/// If user name or pmi is invalid or occupied, will use random number/random personal vanity URL. | ||
/// </summary> | ||
[EnumMember(Value = "ssoCreate")] | ||
SSo | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters