Follow Development on Anook

Development is a public nook on Anook. Sign up to join this nook or create your own public community or private hideout for your blog, forum, guild or anything else you like.

Introduction

Topic started by Chocy Feb 27, 2015, 3:55:48 PM.
Feb 27, 2015, 3:55:48 PM
Chocy wrote
Chocy

This topic will provide you with a basic understanding of the Anook Developer API. It is designed to help you begin exploring and developing with the API as quickly as possible. Before proceeding, we recommend becoming familiar with JavaScript Object Notation (JSON).

The Anook Developer API is RESTful and returns all data in valid JSON. By sending an OPTION request to http://www.anook.com/api or any other endpoint you'll receive a list of available API requests.

In version 1 the API covers game, nook and user information, in future releases we will add feed and content data as well as POST requests to manipulated the data.

By default our APIs return only non-empty values to save on bandwidth. Zero is considered an empty value, as well as empty strings and NULLs. Any numeric field that isn't returned can be assumed to be 0. Any String field that isn't returned can be assumed to be empty string or null.

Common response data:

code
Integer
The HTTP status code.

data
Object
If the request is successful, this object will be populated with the requested data.

errors
Object
Containing errors, whether it's a validation error or an invalid request (all requests that don't return code 200).

pagination
Object
If a request is containing a data list, this object will include total item count, total pages, next and previous page url. This information can also be obtained through the response header's link attribute.

Edited by Chocy Feb 27, 2015, 3:56:29 PM.