Member Data

Get the details of members and member roles in this module

Member Data is an instance of dApp

getRoleData

memberData.getRoleData(roleId,callback)

Get member role details

Arguments:

roleId

Returns

{
roleId //Member role id,
roleName //Member role name in hex format,
roleDescription //Member role description,
limitedValidity //<boolean>Whether validity of a member is limited or permanent
}

getRoles_MemberCount

memberData.getRoles_MemberCount(callback)

Get names of member roles existing in dApp and number of members assigned to that roles

Returns

[
roleNames //Array of role names in hex format
memberCount //Array of Count of members assigned to corresponding role
]

getMemberRoleNameById

memberData.getMemberRoleNameById(roleId,callback)

Get name of member role

Arguments:

Member role id

Returns

Member role name

getMemberAddressByRoleId

memberData.getMemberAddressByRoleId(roleId,callback)

Get addresses of all members assigned to the give role id

Arguments:

Role id

Returns

Array of addressed

getMemberDetails

memberData.getMemberDetails(memberAddres,callback)

Get details of member in dApp

Arguments:

memberAddress

Returns

[
memberReputation //reputation earned by member
totalProposal //Total number of proposals created by member
totalOption //Total number solutions submitted by member
totalVotes //Total number of votes cast by member
]

getMemberRoleIdByAddress

memberData.getMemberRoleIdByAddress(memberAddress,callback)

Get member role id of member address

Arguments:

Member address

Returns

Member role id

getOptionIdByAddress

memberData.getOptionIdByAddress(proposalId,memberAddress,callback)

Get id solution submitted by member for given proposal id

Arguments:

proposal id,
member address

Returns

Option id

getVoteId_againstMember

memberData.getVoteId_againstMember(memberAddress,proposalId,callback)

Get Id of vote cast by member for given proposal

Arguments:

member address,
proposal id

Returns

vote id

getProposalAnsByAddress

memberData.getProposalAnsByAddress(memberAddress,callback)

Get id's of proposals for which member has submitted a solution

Arguments:

memberAddress

Returns

Array of option id's

getProposalWithAnsByAddress

memberData.getProposalWithAnsByAddress(memberAddress,callback)

Get id's of proposals of which member has created proposal with solution

Arguments:

memberAddress

Returns

Array of proposal id's

getVoteArrayByAddress

memberData.getVoteArrayByAddress(memberAddress,callback)

Get id's of all votes cast by member

Arguments:

memberAddress

Returns

Array of vote id's

getProposalsbyAddress

memberData.getProposalsbyAddress(memberAddress,callback)

Get id's of proposals created by member

Arguments:

memberAddress

Returns

Array of proposal id's

getProposalIds

memberData.getProposalIds(memberAddress,callback)

Get id's of proposals in which member has participated

Arguments:

memberAddress

Returns

[
ownerProposals //Array of proposals created by member and proposals for which member had submitted a solution
voterProposals //Array of proposals for which member has cast his vote
]