Category Data
Get parent and child categories data through this module
Category Data is an instance of dApp.

Parent Category Data

getCategoryLength

1
categoryData.getCategoryLength(callback)
Copied!
Get total number of categories present in dApp
Returns
1
Number of existing catgories
Copied!

isCategoryExternal

1
categoryData.isCategoryExternal(categoryId,callback)
Copied!
Check whether category is external
Arguments:
1
categoryId
Copied!
Returns
1
<boolean> Whether category is external
Copied!

getCategoryName

1
categoryData.getCategoryName(categoryId,callback)
Copied!
Get name of the category
Arguments:
1
categoryId
Copied!
Returns
1
Category name
Copied!

getParentCategoriesData

1
categoryData.getParentCategoriesData(categoryId,callback)
Copied!
Get all the details of parent category
Arguments:
1
categoryId
Copied!
Returns
1
Object of parent category details
Copied!

getSubCategoryIdsFromParent

1
categoryData.getSubCategoryIdsFromParent(categoryId,callback)
Copied!
Get all sub category id's present under parent category
Arguments:
1
categoryId
Copied!
Returns
1
Array of subCategory id's
Copied!

getAllSubIdsLength

1
categoryData.getAllSubIdsLength(categoryId,callback)
Copied!
Get length of all sub category id's under parent category
Arguments:
1
categoryId
Copied!
Returns
1
Length of subCategory id's
Copied!

Sub Category Data

getSubCategoryName

1
categoryData.getSubCategoryName(subCategoryId,callback)
Copied!
Get name of the sub category
Arguments:
1
subCategoryId
Copied!
Returns
1
Sub category name
Copied!

getCategoryDataBySubCategoryId

1
categoryData.getCategoryDataBySubCategoryId(subcategoryId,callback)
Copied!
Get parent category data of given subCategoryId
Arguments:
1
subCategoryId
Copied!
Returns
1
Object of categoryData
Copied!

getSubCategoryData1

1
categoryData.getSubCategoryData1(subCategoryId,callback)
Copied!
Get basic details of subCategory
Arguments:
1
subCategoryId
Copied!
Returns
1
Object of subcategoryData
Copied!

getSubCategoryData

1
categoryData.getSubCategoryData(subCategoryId,callback)
Copied!
Get subCategory data including action parameter details
Arguments:
1
subCategoryData
Copied!
Returns
1
Object of subCategoryData
Copied!

hex_to_Ascii

1
categoryData.hex_to_Ascii(hexData)
Copied!
Convert data in hex format to ASCII format
Arguments:
1
hexData
Copied!
Returns
1
Resulting ASCII string
Copied!
Last modified 3yr ago