<commit_before>
This API uses [Semantic Versioning](http://semver.org/). The current version is 0.1.1-dev, developing towards 1.1.0.

#Version 1.1.0-dev
Version 1 of the API does not require any authentication to use. It is limited to a maximum of 1000 requests per hour per IP. If this maximum is exceeded, the API will return error 492 (in accordance with RFC 6585) in its errors (see below).

Jars are layered by `Type > Channel > Version > Build`. For example, a standard Craftbukkit build could be chained as `Craftbukkit > Recommended > 1.6.4 > 1850`, for the last recommended build of version 1.6.4. The API is [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) API. 

All requests to the API receive the following response format. `success` will either be set to true or false. `errors` will always be set, as an array of objects (see *Errors* below). In successful responses, `errors` will be empty. `results` will be the results of the query, and specified in the sections below. See the *Paginated Results* section for information on the pagination properties.

	{
		success: true|false,
		error: [],
		results: ...,
		pages: ...
	}

##Errors
Error are returned in the `error` property in each request response. Each error is an object consisting of two parts: a numeric error code (should be used for any internal testing) and a textual error message (for debugging or display). When an error occurs, a HTTP 400 code will be returned. The API may return the following errors:

 - `{ code: 492, message: 'API rate limit exceeded.' }` - This error is returned if the rate limit, 1000 requests per hour, is exceeded.
 - `{ code: 1000, message: 'Expecting digit, not "foo".' }` - This error is returned if a string was found in place of a digit, as would occur in the request `GET /jar/foo`, for example.
 - `{ code: 1001, message: 'Invalid hierarchy order of "foo". Parts must be given in the order of jar, channel, version, and build.' }` - This error is returned if request parts are given in the wrong order, like `GET /channel/2/jar`. This doesn't make sense, as "jars" own "channels", not the other way around.
 - `{ code: 1002, message: 'Invalid hierarchy part "foo". Must be one of jar, channel, version, or build.' }` - This error is returned if an invalid request part, such as "foo" is given in place of a resource.

##Resources

The following resources are available in this API:

 - `jar` - the type of jar, such as "Craftbukkit" or "FTB".<commit_msg>Fixed version #, added implementation links<commit_after>
This API uses [Semantic Versioning](http://semver.org/). The current version is 1.1.0-dev, developing towards 1.1.0.

#Version 1.1.0-dev
Version 1 of the API does not require any authentication to use. It is limited to a maximum of 1000 requests per hour per IP. If this maximum is exceeded, the API will return error 492 (in accordance with RFC 6585) in its errors (see below).

## Implementations

There have been several implementations of the SpaceGDN API in various languages:

 * **PHP**: [mcprohosting/spacegdn-bridge](https://github.com/MCProHosting/spacegdn-bridge)
 * **JavaScript**: [connor4312/spacegdn-bridge](https://github.com/connor4312/spacegdn-bridge)
 * **Python**: [totokaka/pySpaceGDN](https://github.com/totokaka/pySpaceGDN)

## Overview

Jars are layered by `Type > Channel > Version > Build`. For example, a standard Craftbukkit build could be chained as `Craftbukkit > Recommended > 1.6.4 > 1850`, for the last recommended build of version 1.6.4. The API is [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) API. 

All requests to the API receive the following response format. `success` will either be set to true or false. `errors` will always be set, as an array of objects (see *Errors* below). In successful responses, `errors` will be empty. `results` will be the results of the query, and specified in the sections below. See the *Paginated Results* section for information on the pagination properties.

	{
		success: true|false,
		error: [],
		results: ...,
		pages: ...
	}

##Errors
Error are returned in the `error` property in each request response. Each error is an object consisting of two parts: a numeric error code (should be used for any internal testing) and a textual error message (for debugging or display). When an error occurs, a HTTP 400 code will be returned. The API may return the following errors:

 - `{ code: 492, message: 'API rate limit exceeded.' }` - This error is returned if the rate limit, 1000 requests per hour, is exceeded.
 - `{ code: 1000, message: 'Expecting digit, not "foo".' }` - This error is returned if a string was found in place of a digit, as would occur in the request `GET /jar/foo`, for example.
 - `{ code: 1001, message: 'Invalid hierarchy order of "foo". Parts must be given in the order of jar, channel, version, and build.' }` - This error is returned if request parts are given in the wrong order, like `GET /channel/2/jar`. This doesn't make sense, as "jars" own "channels", not the other way around.
 - `{ code: 1002, message: 'Invalid hierarchy part "foo". Must be one of jar, channel, version, or build.' }` - This error is returned if an invalid request part, such as "foo" is given in place of a resource.

##Resources

The following resources are available in this API:

 - `jar` - the type of jar, such as "Craftbukkit" or "FTB".
{'fraction_non_alphanumeric': 0.09375579025384473, 'fraction_numerical': 0.02149342227163239, 'mean_word_length': 4.03544776119403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 3, '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': '1132221', 'n_tokens_mistral': 1592, 'n_tokens_neox': 1455, 'n_words': 785}