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

GetUserCourses() public method

Returns a list of all courses a user is enrolled in with a summary of his or her total training and training information by course (e.g. enrollment/assignment date, due date, total time spent on the course and progress). By default only the first 100 people are returned.
public GetUserCourses ( int userId, string externalId = null ) : SchooxResponse>
userId int User identifier.
externalId string Sets whether the id given is the external_id of the User. By default, the value is "false"
return SchooxResponse>
        public SchooxResponse<List<Course>> GetUserCourses(int userId, string externalId = null)
        {
            if(userId <= 0)
                throw new ArgumentOutOfRangeException("userId");

            //GET /dashboard/users/:userid/courses
            var request = SService.GenerateBaseRequest("/dashboard/users/{userId}/courses");
            request.Method = Method.GET;

            request.AddUrlSegment("userId", userId.ToString(CultureInfo.InvariantCulture));
            request.AddNonBlankQueryString ("external_id", externalId);

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