apiV2TutorListWithHttpInfo method

Future<Response> apiV2TutorListWithHttpInfo({
  1. int? availability,
  2. int? country,
  3. num? levelId,
  4. int? maxExperience,
  5. num? maxPrice,
  6. int? minExperience,
  7. num? minPrice,
  8. int? page,
  9. String? search,
  10. String? subject,
  11. List<num>? subjectId,
})

Search for tutors

Note: This method returns the HTTP Response.

Parameters:

  • int availability:

  • int country:

  • num levelId:

  • int maxExperience:

  • num maxPrice:

  • int minExperience:

  • num minPrice:

  • int page: A page number within the paginated result set.

  • String search:

  • String subject:

  • List<num> subjectId: Multiple values may be separated by commas.

Implementation

Future<Response> apiV2TutorListWithHttpInfo({ int? availability, int? country, num? levelId, int? maxExperience, num? maxPrice, int? minExperience, num? minPrice, int? page, String? search, String? subject, List<num>? subjectId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v2/tutor/';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (availability != null) {
    queryParams.addAll(_queryParams('', 'availability', availability));
  }
  if (country != null) {
    queryParams.addAll(_queryParams('', 'country', country));
  }
  if (levelId != null) {
    queryParams.addAll(_queryParams('', 'level_id', levelId));
  }
  if (maxExperience != null) {
    queryParams.addAll(_queryParams('', 'max_experience', maxExperience));
  }
  if (maxPrice != null) {
    queryParams.addAll(_queryParams('', 'max_price', maxPrice));
  }
  if (minExperience != null) {
    queryParams.addAll(_queryParams('', 'min_experience', minExperience));
  }
  if (minPrice != null) {
    queryParams.addAll(_queryParams('', 'min_price', minPrice));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (search != null) {
    queryParams.addAll(_queryParams('', 'search', search));
  }
  if (subject != null) {
    queryParams.addAll(_queryParams('', 'subject', subject));
  }
  if (subjectId != null) {
    queryParams.addAll(_queryParams('csv', 'subject_id', subjectId));
  }

  const contentTypes = <String>[];


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