<commit_before># JSONApi
JSONApi is a simple, lightweight way to provide a JSON interface to a Minecraft server with hMod installed.

This plugin was created to be an alternative to CraftAPI. However, JSONApi differs from CraftAPI in that
everything in this plugin is JSON instead of XML-RPC. This one doesn't seem to run out of memory either :). But a huge thanks to sk89q for the binding of all the actions to java methods.
All of his work is in the XMLRPC* files.

Also requests are formed from URLs so you only ever have to do GET requests.

## Notes
The default port is 20059.

**_Always remember to encode the values of the GET variables to make them URL safe!_**

## Standard Request Format
For standard (non-streaming) requests the URL format looks like this:
	
	http://host:port/api/call?method=methodName&args=%5B%22urlEncodedjsonEncodedArrayOfArgs%22%5D&username=username&password=password

You can see the list of available methods below.

## Standard Response Format	
Standard API calls will return one of the following.

These responses are based off of this request:
	
	http://localhost:20059/api/call?method=server.getPlayerCount&args=%5B%5D&username=admin&password=<PASSWORD>
<commit_msg>doc updates<commit_after># JSONApi
JSONApi is a simple, lightweight way to provide a JSON interface to a Minecraft server with hMod installed.

This plugin was created to be an alternative to CraftAPI. However, JSONApi differs from CraftAPI in that
everything in this plugin is JSON instead of XML-RPC. This one doesn't seem to run out of memory either :). But a huge thanks to sk89q for the binding of all the actions to java methods.
All of his work is in the XMLRPC* files.

Also requests are formed from URLs so you only ever have to do GET requests.

## Notes
The default port is 20059.

**_Always remember to encode the values of the GET variables to make them URL safe!_**

## Standard Request Format
For standard (non-streaming) requests the URL format looks like this:
	
	http://host:port/api/call?method=methodName&args=%5B%22urlEncodedjsonEncodedArrayOfArgs%22%5D&username=username&password=password

You can see the list of available methods below.

Here is a sample request this time, _with args_:

	http://localhost:20059/api/call?method=player.sendMessage&args=%5B%22alecgorge%22%5D&username=admin&password=<PASSWORD>
	
**Notes:**

%5B is a url encoded [
%5D is a url encoded ]
%22 is a url encoded "

## Standard Response Format	
Standard API calls will return one of the following.

These responses are based off of this request:
	
	http://localhost:20059/api/call?method=server.getPlayerCount&args=%5B%5D&username=admin&password=<PASSWORD>

{'fraction_non_alphanumeric': 0.06834397296282388, 'fraction_numerical': 0.020653398422831395, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4068578', 'n_tokens_mistral': 780, 'n_tokens_neox': 725, 'n_words': 349}