aiMentorOrgsUsersRecommendCoursesRetrieveWithHttpInfo method

Future<Response> aiMentorOrgsUsersRecommendCoursesRetrieveWithHttpInfo(
  1. String org,
  2. String userId, {
  3. bool? includeLearnerSkills,
  4. bool? rankByDifficulty,
  5. bool? returnCourseData,
  6. int? returnNumber,
  7. String? searchTerms,
})

Recommend courses for a user

Note: This method returns the HTTP Response.

Parameters:

  • String org (required):

  • String userId (required):

  • bool includeLearnerSkills: Include available learner skills for search

  • bool rankByDifficulty: Rank by course difficulty

  • bool returnCourseData: Return course data

  • int returnNumber: Number of courses to return

  • String searchTerms: Terms to be searched

Implementation

Future<Response> aiMentorOrgsUsersRecommendCoursesRetrieveWithHttpInfo(String org, String userId, { bool? includeLearnerSkills, bool? rankByDifficulty, bool? returnCourseData, int? returnNumber, String? searchTerms, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/ai/mentor/orgs/{org}/users/{user_id}/recommend-courses/'
    .replaceAll('{org}', org)
    .replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (includeLearnerSkills != null) {
    queryParams.addAll(_queryParams('', 'include_learner_skills', includeLearnerSkills));
  }
  if (rankByDifficulty != null) {
    queryParams.addAll(_queryParams('', 'rank_by_difficulty', rankByDifficulty));
  }
  if (returnCourseData != null) {
    queryParams.addAll(_queryParams('', 'return_course_data', returnCourseData));
  }
  if (returnNumber != null) {
    queryParams.addAll(_queryParams('', 'return_number', returnNumber));
  }
  if (searchTerms != null) {
    queryParams.addAll(_queryParams('', 'search_terms', searchTerms));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}