getArticles method

Future<PagedDTOArticleDTO> getArticles({
  1. required String serviceDeskId,
  2. String? query,
  3. bool? highlight,
  4. int? start,
  5. int? limit,
})

Returns articles which match the given query and belong to the knowledge base linked to the service desk.

Permissions required: Permission to access the service desk.

Implementation

Future<PagedDTOArticleDTO> getArticles(
    {required String serviceDeskId,
    String? query,
    bool? highlight,
    int? start,
    int? limit}) async {
  return PagedDTOArticleDTO.fromJson(await _client.send(
    'get',
    'rest/servicedeskapi/servicedesk/{serviceDeskId}/knowledgebase/article',
    pathParameters: {
      'serviceDeskId': serviceDeskId,
    },
    queryParameters: {
      if (query != null) 'query': query,
      if (highlight != null) 'highlight': '$highlight',
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
    },
  ));
}