SchooxSharp.Api.Clients.Dashboard.GetUsers C# (CSharp) Method

GetUsers() public method

Returns a list of current users in your organization with a summary of their training performance (e.g. total training hours, courses and exams). By default only the first 100 people are returned. The list can be filtered on letter, role, region and location and paged using the optional paging parameters.
public GetUsers ( string role, int userId = null, string externalId = null, int aboveId = null, int unitId = null, int jobId = null, int start = null, int limit = 100, string sort = null ) : SchooxResponse>
role string Users' role
userId int User Id to be simulated as logged in user
externalId string Sets whether the id given is the external_id of the User. By default, the value is "false"
aboveId int Above Unit's ID
unitId int Unit's ID
jobId int Job's ID
start int List's starting position
limit int Number of users to return per request, up to maximum of 1,000. Default to 100
sort string Sorting criteria
return SchooxResponse>
        public SchooxResponse<List<User>> GetUsers(string role, int? userId = null, string externalId = null, 
            int? aboveId = null, int? unitId = null, int? jobId = null, int? start = null,
            int? limit = 100, string sort = null)
        {
            //GET /dashboard/users
            var request = SService.GenerateBaseRequest("/dashboard/users");
            request.Method = Method.GET;

            request.AddNonBlankQueryString ("role", role);
            request.AddNonBlankQueryString ("userId", userId);
            request.AddNonBlankQueryString ("external_id", externalId);
            request.AddNonBlankQueryString ("aboveId", aboveId);
            request.AddNonBlankQueryString ("unitId", unitId);
            request.AddNonBlankQueryString ("jobId", jobId);
            request.AddNonBlankQueryString ("start", start);
            request.AddNonBlankQueryString ("limit", limit);
            request.AddNonBlankQueryString ("sort", sort);

            return Execute<List<User>>(request);
        }