Skip to content

Commit

Permalink
Merge branch 'release/0.27.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Mar 26, 2021
2 parents 8c40f04 + 5d51f01 commit 3049d35
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 46 deletions.
11 changes: 11 additions & 0 deletions Source/ZoomNet.IntegrationTests/ConsoleUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ public static void CenterConsole()

NativeMethods.MoveWindow(hWin, left, top, consoleWidth, consoleHeight, false);
}

public static char Prompt(string prompt)
{
while (Console.KeyAvailable)
{
Console.ReadKey(false);
}
Console.Out.WriteLine(prompt);
var result = Console.ReadKey();
return result.KeyChar;
}
}
}
2 changes: 1 addition & 1 deletion Source/ZoomNet.IntegrationTests/Tests/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca
await log.WriteLineAsync("\n***** USERS *****\n").ConfigureAwait(false);

// GET ALL THE USERS
var paginatedUsers = await client.Users.GetAllAsync(UserStatus.Active, null, 100, 1, cancellationToken).ConfigureAwait(false);
var paginatedUsers = await client.Users.GetAllAsync(UserStatus.Active, null, 100, (string)null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"There are {paginatedUsers.Records.Length} users").ConfigureAwait(false);

// CLEANUP PREVIOUS INTEGRATION TESTS THAT MIGHT HAVE BEEN INTERRUPTED BEFORE THEY HAD TIME TO CLEANUP AFTER THEMSELVES
Expand Down
4 changes: 2 additions & 2 deletions Source/ZoomNet.IntegrationTests/TestsRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task<int> RunAsync()

// Ensure the Console is tall enough and centered on the screen
Console.WindowHeight = Math.Min(60, Console.LargestWindowHeight);
Utils.CenterConsole();
ConsoleUtils.CenterConsole();

// These are the integration tests that we will execute
var integrationTests = new Type[]
Expand Down Expand Up @@ -157,7 +157,7 @@ public async Task<int> RunAsync()
var promptLog = new StringWriter();
await promptLog.WriteLineAsync("\n\n**************************************************").ConfigureAwait(false);
await promptLog.WriteLineAsync("Press any key to exit").ConfigureAwait(false);
Utils.Prompt(promptLog.ToString());
ConsoleUtils.Prompt(promptLog.ToString());

// Return code indicating success/failure
var resultCode = (int)ResultCodes.Success;
Expand Down
43 changes: 0 additions & 43 deletions Source/ZoomNet.IntegrationTests/Utils.cs

This file was deleted.

15 changes: 15 additions & 0 deletions Source/ZoomNet/Resources/IUsers.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
Expand Down Expand Up @@ -25,8 +26,22 @@ public interface IUsers
/// <returns>
/// An array of <see cref="User">users</see>.
/// </returns>
[Obsolete("Zoom is in the process of deprecating the \"page number\" and \"page count\" fields.")]
Task<PaginatedResponse<User>> GetAllAsync(UserStatus status = UserStatus.Active, string roleId = null, int recordsPerPage = 30, int page = 1, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieve all users on your account.
/// </summary>
/// <param name="status">The user status. Allowed values: Active, Inactive, pending.</param>
/// <param name="roleId">Unique identifier for the role. Provide this parameter if you would like to filter the response by a specific role.</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="User">users</see>.
/// </returns>
Task<PaginatedResponseWithToken<User>> GetAllAsync(UserStatus status = UserStatus.Active, string roleId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default);

/// <summary>
/// Creates a user.
/// </summary>
Expand Down

0 comments on commit 3049d35

Please sign in to comment.