Skip to content
PEMapModder edited this page Sep 10, 2015 · 10 revisions

Contents

This wiki documents the LegionPE API. Please create an issue if you have any requests or found any bugs.

  1. Overview of the API
  2. Accounts and authentication
  3. User information

Overview

Requests should be sent in HTTP format to http://legionpvp.eu/api/*.

In this documentation, each component consists of parameters and response data.

Parameters are data sent using GET or POST.

The response of each successful request is like this:

{
  "status": true,
  "error": null,
  "data": responseData
}

where responseData is an object with the structure as described in response data.

For each unsuccessful request, the response is like this:

{
  "status": false,
  "error": errorMessage,
  "data": null
}

where errorMessage is a string containing a human-readable error information. It should be directly displayed to the user. However, it may also show mistakes done by the developer of the client.

In order to make it easier for developers to read, an extra GET parameter pretty (value-insensitive) can be used to make the result JSON data formatted with spaces and line breaks.

Termininology

Some terms used in this documentation are defined in RFC 2119 and RFC 6919. JSON standards are from PHP function json_encode, which conforms to RFC 7159.

Clone this wiki locally