-
Notifications
You must be signed in to change notification settings - Fork 5
NameLayer API
Requests general group information. In response to this the server will send a NameLayer info packet.
{
"type": "nl-info",
"identifier": "UNIQUE_IDENTIFIER"
"subscribe_invites": "true"
}
Requests information specific to a group In response to this the server will send a NameLayer group info packet.
{
"type": "nl-groupinfo",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland"
}
Replies to a group invitation In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-handleinvite",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"accept": "true"
}
Toggles whether you will auto accept invites No reply will be sent to this packet
{
"type": "nl-autoaccept",
"state": "true"
}
Allows you to invite a player to a group In response to this the server will send a NameLayer confirmation packet. Rank is optional, if not specified the default invitation rank for this group will be used. Player may be specified by name or UUID
{
"type": "nl-invite",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"player": "Maxopoly",
"rank": "Owner"
}
Allows you to kick a player from a group In response to this the server will send a NameLayer confirmation packet. Player may be specified by name or UUID
{
"type": "nl-kick",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"player": "Maxopoly"
}
Allows you to blacklist a player from a group In response to this the server will send a NameLayer confirmation packet. Player may be specified by name or UUID
{
"type": "nl-blacklist",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"rank": "Banished"
"player": "Thoths_Librarian"
}
Allows you to change a players rank in a group In response to this the server will send a NameLayer confirmation packet. Player may be specified by name or UUID
{
"type": "nl-changerank",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"player": "Maxopoly",
"rank": "Owner"
}
Allows you to delete a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-deletegroup",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland"
}
Allows you to rename a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-renamegroup",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"new_name": "Falstadt"
}
Allows you to change a groups password In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-setpassword",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland"
"password": "squids69"
}
Allows you to merge a group into another In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-merge",
"identifier": "UNIQUE_IDENTIFIER",
"group_to_keep": "Hjaltland",
"group_to_remove": "Falstadt"
}
Allows you to leave a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-leave",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland"
}
Creates a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-creategroup",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland"
}
Creates a new rank for a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-createrank",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"rank": "Chad"
}
Renames a rank for a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-renamerank",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"rank": "Chad",
"new_name": "Gigachad"
}
Deletes a rank from a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-deleterank",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"rank": "Chad",
}
Modifies a permission for a rank in a group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-modifyperm",
"identifier": "UNIQUE_IDENTIFIER",
"group": "Hjaltland",
"rank": "Chad",
"permission": "REINFORCE",
"state": "true"
}
Adds a link from one rank in a group to a rank in another group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-addlink",
"identifier": "UNIQUE_IDENTIFIER",
"source_group": "Hjaltland",
"source_rank": "Chad",
"target_group": "Falstadt",
"target_rank": "Winner"
}
Removes a link from one rank in a group to a rank in another group In response to this the server will send a NameLayer confirmation packet.
{
"type": "nl-removelink",
"identifier": "UNIQUE_IDENTIFIER",
"source_group": "Hjaltland",
"source_rank": "Chad",
"target_group": "Falstadt",
"target_rank": "Winner"
}
Subscribes to group changes, which will be sent in group change packets Will be replied to with a subscribed group packet
{
"type": "nl-subscribe",
"identifier": "UNIQUE_IDENTIFIER",
"groups": ["Hjaltand", "Falstadt", "VRA"]
}
Unsubscribes from group changes packets for certain groups Will be replied to with a subscribed group packet
{
"type": "nl-unsubscribe",
"identifier": "UNIQUE_IDENTIFIER",
"groups": ["Hjaltand", "Falstadt", "VRA"]
}
Will be sent in reply to TODO info packet.
{
"type": "nl-inforeply",
"identifier": "UNIQUE_IDENTIFIER",
"groups":
{
{
"name": "Hjaltland",
"rank": "Owner"
},
{
"name": "Falstadt",
"rank": "Owner"
},
{
"name": "Yoahtl",
"rank": "Member"
}
},
"auto_accept_invites": "true",
"invites":
{
{
"name": "VRA",
"rank": "Admin"
},
{
"name": "Alpha",
"rank": "Mod"
}
}
}
Will be sent in reply to TODO group info packet. The members, blacklist and open_invites sections will only include the players with ranks you have listing permissions for. If a rank does not specify a parent, it is either the root node if it is not a blacklist rank or inheriting from the default non-member type if it is a blacklist rank. The permissions section will always contain at least the permissions for the players own rank, but only more if the player has sufficient permission. Action_log will only be included if you have permission to see it.
{
"type": "nl-groupinforeply",
"identifier": "UNIQUE_IDENTIFIER",
"visible_ranks":
{
{
"name": "Owner",
"blacklisted": "false",
},
{
"name": "Admin",
"blacklisted": "false",
"parent": "Owner"
},
{
"name": "Mod",
"blacklisted": "false",
"parent": "Admin"
},
{
"name": "Member",
"blacklisted": "false",
"parent": "Mod"
},
{
"name": "Banished",
"blacklisted": "true",
}
},
"members":
{
{
"name": "Frensin",
"rank": "Owner"
},
{
"name": "Maxopoly",
"rank": "Owner"
},
{
"name": "tankbuster44",
"rank": "Admin"
}
},
"blacklist":
{
{
"name": "Thoths_Librarian",
"rank": "Banished"
}
},
"open_invites":
{
{
"name": "tankbuster44",
"rank": "Owner"
}
}
"permissions":
{
{
"rank": "Owner",
"permissions": ["REINFORCE","CHAT"]
},
{
"rank": "Admin",
"permissions": ["CHAT"]
},
...
},
action_log:
{
{
"time": "1543456000" //UNIX in ms
"type": "Invite",
"player": "Frensin",
"rank": "Owner",
"cause": "Maxopoly"
},
...
}
}
NameLayer confirmation packet
Sent in reply to a group edit.
Result will be one of the following: "SUCCESS", "INSUFFICIENT_PERMISSION", "GROUP_NAME_TAKEN", "RANK_NAME_TAKEN", "NOT_INVITED", "GROUP_DOES_NOT_EXIST", "RANK_DOES_NOT_EXIST", "PLAYER_DOES_NOT_EXIST", "PLAYER_NOT_A_MEMBER", "PLAYER_IS_MEMBER","NO_CHANGES_MADE", "FAILURE"
Message is individual to the type of request made and may provide additional information
{
"type": "nl-reply",
"identifier": "UNIQUE_IDENTIFIER",
"result": "SUCCESS",
"message": "All good",
}
Sent in reply to subscribing/unsubscribing from groups
{
"type": "nl-subscribereply",
"identifier": "UNIQUE_IDENTIFIER",
"groups": ["Mir","AoN"]
}
Sent for groups you have subscribed to
{
"type": "nl-groupsub",
"group": "Hjaltland",
"change_type": "invite_player",
"player": "Frensin",
"rank": "Owner"
"cause": "Maxopoly"
}
Sent when you are subscribed to group invitations and invited to a group
{
"type": "nl-invitereceived",
"group": "Hjaltland",
"rank": "Owner"
"auto_accepted": "true"
}
Sent when you are subscribed to group invitations and an invite for you is revoked
{
"type": "nl-inviterevoked",
"group": "Hjaltland",
"rank": "Owner"
}