getResources()
The ZohoSalesIQ.KnowledgeBase.getResources API allows to get a list of resources (articles). To get a specific resource category list, use the below parameters as filters.
Parameters:
- type * - (Article) The type of the resource.
- departmentId (Optional) - Department ID to fetch resource associated with it.
- parentCategoryId (Optional) - Category ID to get the articles.
- searchKey (Optional) - A search keyword to further filter the results.
- page (Optional) - Specify the number of pages. (Default value is 1)
- limit (Optional) - Specify the number of articles to be fetched for a page. (Default & maximum value is 99)
Returns
- A Future that completes with a List<Result> representing the retrieved resources.
Result:
- resources - A list of resources (Articles).
- moreDataAvailable - A boolean indicating an excess of resources beyond the specified page limit.
Note:
- The content in the resource object will be null by default. To get the resource content, use the getSingleResource() API.
- Fields marked * are mandatory
Error code
Code | Message |
---|---|
500 | Mobilisten SDK not initialized |
600 | No network connection |
605 | Mobilisten is disabled |
Example
CopiedZohoSalesIQ.knowledgeBase.getResources(ResourceType.articles, 'departmentId', 'parentCategoryId', 'searchKey', page, limit).then((result) {
}).catchError((error) {
});