ListUsers() public method

List all Users.

It mirrors To the following Smartsheet REST API method: GET /Users

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListUsers ( IEnumerable emails, PaginationParameters paging ) : PaginatedResult
emails IEnumerable list of emails
paging PaginationParameters the pagination
return PaginatedResult
Example #1
0
        public virtual void TestListUsers()
        {
            server.setResponseBody("../../../TestSDK/resources/listUsers.json");

            IList <User> users = userResources.ListUsers();

            Assert.NotNull(users);
            Assert.AreEqual(2, users.Count);
            Assert.AreEqual(94094820842L, (long)users[0].ID);
            Assert.AreEqual(true, users[0].Admin);
            Assert.AreEqual("*****@*****.**", users[0].Email);
            Assert.AreEqual("John Doe", users[0].Name);
            Assert.AreEqual(true, users[0].LicensedSheetCreator);
            Assert.AreEqual(UserStatus.ACTIVE, users[0].Status);
        }
        public virtual void TestListUsers()
        {
            server.setResponseBody("../../../TestSDK/resources/listUsers.json");

            // Test that only one result is returned
            PaginatedResult <User> result = userResources.ListUsers(new string[] { "*****@*****.**" }, new PaginationParameters(true, null, null));

            Assert.NotNull(result);
            IList <User> users = result.Data;

            Assert.AreEqual(2, users.Count);
            Assert.AreEqual(2421657013905284L, (long)users[0].Id);
            Assert.AreEqual("*****@*****.**", users[0].Email);
            Assert.AreEqual("John Doe", users[0].Name);

            // Test that all are returned

            // Test that two are returned

            // Test tha none are returned
        }