Hive Developer Portal
Ops:
To interact with the communities framework, use custom_json
operations with the an id
of community
. Communities also intepret other ids like follow
and reblog
.
See: communities.md
Also see: Bridge, Broadcast Transaction, custom_json
- SDK Reference
- Related
setRole
Sets a role for a given account in a community.
- Owner can set any role.
- Admins can set the role of any account to any level below
admin
, except for other Admins. - Mods can set the role of any account to any level below
mod
, except for other Mods.
Roles: posting
Parameters: community account role
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"setRole\", {\"community\": \"hive-123456\", \"account\": \"bob\", \"role\": \"admin\"}]"
}
]
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"setRole\", {\"community\": \"hive-123456\", \"account\": \"charlie\", \"role\": \"mod\"}]"
}
]
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"setRole\", {\"community\": \"hive-123456\", \"account\": \"dave\", \"role\": \"guest\"}]"
}
]
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"setRole\", {\"community\": \"hive-123456\", \"account\": \"edward\", \"role\": \"member\"}]"
}
]
- SDK Reference
- Related
setUserTitle
Sets a title (badge) for a given account in a community (Mods or higher).
Roles: posting
Parameters: community account title
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"setUserTitle\", {\"community\": \"hive-123456\", \"account\": \"alice\", \"title\": \"Founder\"}]"
}
]
- SDK Reference
- Related
mutePost
Mute a post (Mods or higher). Can be a topic or a comment.
Note: Any posts muted for spam should contain simply the string spam in the notes field. This standardized label will help train automated spam detection.
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"mutePost\",{\"community\":\"hive-123456\",\"account\":\"eve\",\"permlink\":\"re-eve-comment-1564339652z\",\"notes\":\"Off Topic\"}]"
}
]
- SDK Reference
- Related
unmutePost
Unmute a post (Mods or higher).
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"unmutePost\",{\"community\":\"hive-123456\",\"account\":\"eve\",\"permlink\":\"re-eve-comment-1564339652z\",\"notes\":\"On Topic (on second thought)\"}]"
}
]
- SDK Reference
- Related
updateProps
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"updateProps\",{\"community\":\"hive-123456\",\"props\":{\"title\":\"Anti-Knitting\",\"about\":\"A community against knitting.\",\"is_nsfw\":false,\"description\":\"If you like to knitting, go away.\",\"flag_text\":\"Must hate knitting or else you will be muted.\"}}]"
}
]
- SDK Reference
- Related
subscribe
Allows a user to signify they want this community shown on their personal trending feed and to be shown in their navigation menu.
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"subscribe\",{\"community\":\"hive-123456\"}]"
}
]
- SDK Reference
- Related
pinPost
Stickies a post to the top of the community homepage (Mods or higher). If multiple posts are stickied, the newest ones are shown first.
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"pinPost\",{\"community\":\"hive-123456\",\"account\":\"alice\",\"permlink\":\"a-post-by-alice\"}]"
}
]
- SDK Reference
- Related
unsubscribe
Allows a user to signify they no longer want this community shown on their personal trending feed or to be shown in their navigation menu.
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"unsubscribe\",{\"community\":\"hive-123456\"}]"
}
]
- SDK Reference
- Related
unpinPost
Removes a post to the top of the community homepage (Mods or higher).
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"unpinPost\",{\"community\":\"hive-123456\",\"account\":\"alice\",\"permlink\":\"a-post-by-alice\"}]"
}
]
- SDK Reference
- Related
flagPost
Used by guests to suggest a post for the review queue. It’s up to the community to define what constitutes flagging.
Roles:
Parameters:
Example Op:
[
"custom_json",
{
"required_auths": [],
"required_posting_auths": ["alice"],
"id": "community",
"json": "[\"flagPost\",{\"community\":\"hive-123456\",\"account\":\"eve\",\"permlink\":\"a-post-by-eve\",\"notes\":\"Warning\"}]"
}
]