Category Data is an instance of dApp.
categoryData.getCategoryLength(callback)
Get total number of categories present in dApp
Returns
Number of existing catgories
​
categoryData.isCategoryExternal(categoryId,callback)
Check whether category is external
Arguments:
categoryId
Returns
<boolean> Whether category is external
​
categoryData.getCategoryName(categoryId,callback)
Get name of the category
Arguments:
categoryId
Returns
Category name
​
categoryData.getParentCategoriesData(categoryId,callback)
Get all the details of parent category
Arguments:
categoryId
Returns
Object of parent category details
​
categoryData.getSubCategoryIdsFromParent(categoryId,callback)
Get all sub category id's present under parent category
Arguments:
categoryId
Returns
Array of subCategory id's
​
categoryData.getAllSubIdsLength(categoryId,callback)
Get length of all sub category id's under parent category
Arguments:
categoryId
Returns
Length of subCategory id's
​
categoryData.getSubCategoryName(subCategoryId,callback)
Get name of the sub category
Arguments:
subCategoryId
Returns
Sub category name
categoryData.getCategoryDataBySubCategoryId(subcategoryId,callback)
Get parent category data of given subCategoryId
Arguments:
subCategoryId
Returns
Object of categoryData
​
categoryData.getSubCategoryData1(subCategoryId,callback)
Get basic details of subCategory
Arguments:
subCategoryId
Returns
Object of subcategoryData
​
categoryData.getSubCategoryData(subCategoryId,callback)
Get subCategory data including action parameter details
Arguments:
subCategoryData
Returns
Object of subCategoryData
​
categoryData.hex_to_Ascii(hexData)
Convert data in hex format to ASCII format
Arguments:
hexData
Returns
Resulting ASCII string