Category Data

Get parent and child categories data through this module

Category Data is an instance of dApp.

Parent Category Data

getCategoryLength

categoryData.getCategoryLength(callback)

Get total number of categories present in dApp

Returns

Number of existing catgories

isCategoryExternal

categoryData.isCategoryExternal(categoryId,callback)

Check whether category is external

Arguments:

categoryId

Returns

<boolean> Whether category is external

getCategoryName

categoryData.getCategoryName(categoryId,callback)

Get name of the category

Arguments:

categoryId

Returns

Category name

getParentCategoriesData

categoryData.getParentCategoriesData(categoryId,callback)

Get all the details of parent category

Arguments:

categoryId

Returns

Object of parent category details

getSubCategoryIdsFromParent

categoryData.getSubCategoryIdsFromParent(categoryId,callback)

Get all sub category id's present under parent category

Arguments:

categoryId

Returns

Array of subCategory id's

getAllSubIdsLength

categoryData.getAllSubIdsLength(categoryId,callback)

Get length of all sub category id's under parent category

Arguments:

categoryId

Returns

Length of subCategory id's

Sub Category Data

getSubCategoryName

categoryData.getSubCategoryName(subCategoryId,callback)

Get name of the sub category

Arguments:

subCategoryId

Returns

Sub category name

getCategoryDataBySubCategoryId

categoryData.getCategoryDataBySubCategoryId(subcategoryId,callback)

Get parent category data of given subCategoryId

Arguments:

subCategoryId

Returns

Object of categoryData

getSubCategoryData1

categoryData.getSubCategoryData1(subCategoryId,callback)

Get basic details of subCategory

Arguments:

subCategoryId

Returns

Object of subcategoryData

getSubCategoryData

categoryData.getSubCategoryData(subCategoryId,callback)

Get subCategory data including action parameter details

Arguments:

subCategoryData

Returns

Object of subCategoryData

hex_to_Ascii

categoryData.hex_to_Ascii(hexData)

Convert data in hex format to ASCII format

Arguments:

hexData

Returns

Resulting ASCII string