Skip to product menu
Skip to main content

getResources()

The ZohoSalesIQ.KnowledgeBase.getResources API allows to get a list of resources (articles). To get a specific resource list, use the below parameters as filters. 

Parameters: 

  • resourceType * - (Article) The type of the resource.
  • departmentId (Optional) -  Department ID to fetch resource associated with it.
  • parentCategoryId (Optional) - Category Id to get the articles.
  • 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)
  • listener * - The callback to get the resources.

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

CodeMessage
500Mobilisten SDK not initialized
600No network connection
605Mobilisten is disabled

Syntax

CopiedZohoSalesIQ.KnowledgeBase.getResources(ZohoSalesIQ.ResourceType.Articles, "department_id", "category_id", "search_key", 1, 10, new ResourceListener() {
    @Override
    public void onSuccess(@NonNull List<Resource> resources, boolean moreDataAvailable) {
    }

    @Override
    public void onFailure(int code, @Nullable String message) {
    }
});
CopiedZohoSalesIQ.KnowledgeBase.getResources(ZohoSalesIQ.ResourceType.Articles, "department_id", "category_id", "search_key", 1, 99, object : ResourceListener {

      override fun onSuccess(resourceCategories: List<Resource>, moreDataAvailable: Boolean) {
                
      }

      override fun onFailure(code: Int, message: String?) {
                
      }
})