getArticles method

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

Returns articles which match the given query string across all service desks.

Permissions required: Permission to access the customer portal.

Implementation

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