Member Data
Get the details of members and member roles in this module
Member Data is an instance of dApp

getRoleData

1
memberData.getRoleData(roleId,callback)
Copied!
Get member role details
Arguments:
1
roleId
Copied!
Returns
1
{
2
roleId //Member role id,
3
roleName //Member role name in hex format,
4
roleDescription //Member role description,
5
limitedValidity //<boolean>Whether validity of a member is limited or permanent
6
}
Copied!

getRoles_MemberCount

1
memberData.getRoles_MemberCount(callback)
Copied!
Get names of member roles existing in dApp and number of members assigned to that roles
Returns
1
[
2
roleNames //Array of role names in hex format
3
memberCount //Array of Count of members assigned to corresponding role
4
]
Copied!

getMemberRoleNameById

1
memberData.getMemberRoleNameById(roleId,callback)
Copied!
Get name of member role
Arguments:
1
Member role id
Copied!
Returns
1
Member role name
Copied!

getMemberAddressByRoleId

1
memberData.getMemberAddressByRoleId(roleId,callback)
Copied!
Get addresses of all members assigned to the give role id
Arguments:
1
Role id
Copied!
Returns
1
Array of addressed
Copied!

getMemberDetails

1
memberData.getMemberDetails(memberAddres,callback)
Copied!
Get details of member in dApp
Arguments:
1
memberAddress
Copied!
Returns
1
[
2
memberReputation //reputation earned by member
3
totalProposal //Total number of proposals created by member
4
totalOption //Total number solutions submitted by member
5
totalVotes //Total number of votes cast by member
6
]
Copied!

getMemberRoleIdByAddress

1
memberData.getMemberRoleIdByAddress(memberAddress,callback)
Copied!
Get member role id of member address
Arguments:
1
Member address
Copied!
Returns
1
Member role id
Copied!

getOptionIdByAddress

1
memberData.getOptionIdByAddress(proposalId,memberAddress,callback)
Copied!
Get id solution submitted by member for given proposal id
Arguments:
1
proposal id,
2
member address
Copied!
Returns
1
Option id
Copied!

getVoteId_againstMember

1
memberData.getVoteId_againstMember(memberAddress,proposalId,callback)
Copied!
Get Id of vote cast by member for given proposal
Arguments:
1
member address,
2
proposal id
Copied!
Returns
1
vote id
Copied!

getProposalAnsByAddress

1
memberData.getProposalAnsByAddress(memberAddress,callback)
Copied!
Get id's of proposals for which member has submitted a solution
Arguments:
1
memberAddress
Copied!
Returns
1
Array of option id's
Copied!

getProposalWithAnsByAddress

1
memberData.getProposalWithAnsByAddress(memberAddress,callback)
Copied!
Get id's of proposals of which member has created proposal with solution
Arguments:
1
memberAddress
Copied!
Returns
1
Array of proposal id's
Copied!

getVoteArrayByAddress

1
memberData.getVoteArrayByAddress(memberAddress,callback)
Copied!
Get id's of all votes cast by member
Arguments:
1
memberAddress
Copied!
Returns
1
Array of vote id's
Copied!

getProposalsbyAddress

1
memberData.getProposalsbyAddress(memberAddress,callback)
Copied!
Get id's of proposals created by member
Arguments:
1
memberAddress
Copied!
Returns
1
Array of proposal id's
Copied!

getProposalIds

1
memberData.getProposalIds(memberAddress,callback)
Copied!
Get id's of proposals in which member has participated
Arguments:
1
memberAddress
Copied!
Returns
1
[
2
ownerProposals //Array of proposals created by member and proposals for which member had submitted a solution
3
voterProposals //Array of proposals for which member has cast his vote
4
]
Copied!
Last modified 3yr ago
Copy link