searchContents method
Gets all the contents in a dialogue that matches the search keyword.
Takes request
of type SearchContentsRequest.
Implementation
Future<DialoguewiseResponse> searchContents(
SearchContentsRequest request) async {
if (request.slug.isEmpty) {
throw ArgumentError("Please provide a Slug.");
}
http.Request clientRequest =
_getHeader(accessToken, Endpoints.searchContents);
clientRequest.body = jsonEncode(request);
return _getResponse(clientRequest);
}