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);
}