Syncano.Net.Api.UserSyncanoClient.GetAll C# (CSharp) Method

GetAll() public method

Gets all users from within instance. To paginate and to get more data, use since_id.
public GetAll ( string sinceId = null, long limit = MaxLimit ) : Task>
sinceId string If specified, will only return users with id higher than since_id (newer).
limit long Number of users to be returned. Default and max value: 100
return Task>
        public Task<List<User>> GetAll(string sinceId = null, long limit = MaxLimit)
        {
            if(limit > MaxLimit)
                throw new ArgumentException();

            return _syncanoClient.GetAsync<List<User>>("user.get_all", new {since_id = sinceId, limit}, "user");
        }

Usage Example

        public async Task GetAll_WithSinceId_GetsListOfUsers(UserSyncanoClient client)
        {
            //when
            var result = await client.GetAll(TestData.OldUserId);

            //then
            result.ShouldNotBeNull();
            result.ShouldNotBeEmpty();
            result.Count.ShouldEqual(1);
        }
All Usage Examples Of Syncano.Net.Api.UserSyncanoClient::GetAll