JSONAPI
public class JSONAPI
http://github.com/alecgorge/JSONAPI
Method Summary | |
---|---|
void | __construct(mixed host, mixed port, mixed uname, mixed pword, mixed salt) Creates a new JSONAPI instance. |
array | call(string method, array args) Calls the single given JSONAPI API method with the given args. |
array | callMultiple(array methods, array args) Calls the given JSONAPI API methods with the given args. |
string | createKey(string method) Generates the proper SHA256 based key from the given method suitable for use as the key GET parameter in a JSONAPI API call. |
string | makeURL(string method, array args) Generates the proper URL for a standard API call the given method and arguments. |
string | makeURLMultiple(array methods, array args) Generates the proper URL for a multiple API call the given method and arguments. |
public void __construct(mixed host, mixed port, mixed uname, mixed pword, mixed salt)
Creates a new JSONAPI instance.
public array call(string method, array args)
Calls the single given JSONAPI API method with the given args.
public array callMultiple(array methods, array args)
Calls the given JSONAPI API methods with the given args.
public string createKey(string method)
Generates the proper SHA256 based key from the given method suitable for use as the key GET parameter in a JSONAPI API call.
public string makeURL(string method, array args)
Generates the proper URL for a standard API call the given method and arguments.
public string makeURLMultiple(array methods, array args)
Generates the proper URL for a multiple API call the given method and arguments.
A PHP class for access Minecraft servers that have Bukkit with the
JSONAPI
plugin installed.This class handles everything from key creation to URL creation to actually returning the decoded JSON as an associative array.