Added TotalPermissions method to get the combined total permissions as used for HasPermissions
Added totalpermissions to output of /v2/group/read output in RestAPI
Refactored method names to be consistent with function e.g. Off -> ServerOff
Added new endpoints:-
/v2/server/status - Status query including player and rules matching common query tool requirements such as qstat. The json returned uses native types e.g. int's where possible
/v2/groups/list - Lists groups
/v2/groups/read - Query group detail
/v2/groups/destroy - Remove a group
/v2/groups/create - Create a group
/v2/players/list - Lists players including basic details
/v2/users/create - Create a user
/v2/users/list - Lists users basic user details applying a filter if specified.
Refactored missing parameter and error handling to use common utility methods RestError, RestMissingParam which ensures consistency across all functions and protects against null object references
Removed maxplayers from /status to ensure 100% compatibility, this and more details can be found in the new end point /v2/server/status
Protected against null names in user/activelist
Refactored variable checks to use string.IsNullOrWhiteSpace where applicable to capture errors early in the RestAPI
Added the ability to location users by "id" matching the underlying API.
Refactored locating players, bans & users to utility methods to ensure consitency across the api and eliminate duplicate code making for easier maintainence
NOTE: Duplicate and invalid DB entries currently can still be made if the DB format hasn't been updated to with missing unique and not null constaints
Removed { RequiresToken = true } from RestCommand constructors as this is the default anyway.
Optimised function calls so that tests are processed sequentially avoiding unnessasary operations in failure cases
Cleaned up formatting ensuring consistent line endings, indentation and single line if layout
Fixed ServerCommand duplicate key issue for multi line returns, now uses a single "response" string with embeded newlines
Fixed PlayerKill output using verb instead of parameters for "from" option
- /v2/server/rawcmd
Takes parameters:
- cmd
Commands have to start with /, some commands aren't written properly, and may not return any more output than a status code.