Developers: API Documentation

Overview

Server responses

API reference

Roar Engine: Overview

Roar gives you a platform to create amazing social game mechanics using core building blocks that can be combined to build a huge range of popular as well as custom gameplay systems. You can access the creation tools from the Dashboard.

Once you've created the core components, you can access the meta-data and game logic using the Roar API.

Web API

Each game has its own distinct API URL, usually something like http://api.roar.io/{yourgame}/.

All Roar API calls are formatted using the same pattern: /controller/action/ (ensuring a trailing slash). If your game key was 'rockstar', you'd access the /info/ping API call as follows:

Example: http://api.roar.io/rockstar/info/ping/

All calls to Roar Engine are done using HTTP POST. This is not strictly RESTful, but it is very cross-device and cross-platform friendly, which was a more important goal for Roar. Most calls require the sending of an auth_token (authentication token) as a parameter, which can be obtained by logging a user in using user/login or facebook/login_oauth. Content type (mandatory) and character set (optional) should be set in the http header as follows:

  • Content-type: application/x-www-form-urlencoded
  • Charset: UTF-8

    Server Responses

    All Roar API responses are structured using the same pattern for any given /controller/action/ API call:

    <roar tick="{servertime}"> 
      <controller> 
        <action status="ok|error">
          <!-- Action responses returned here -->
        </action>
      </controller>
    </roar>

    You may notice that along with the response to the API call that you have made, on occasion Roar will supply an additional <server> chunk of data. This data represents updates that have occurred within Roar that are relevant to the user (and often tied to recent API calls).

    What's next?

    This API reference is a start. You can also check out our more detailed documentation.

    Follow us on Twitter @roarengine for the latest updates.

    If you have suggestions and feedback, join the conversation on our forum. And if you get totally stuck, drop us a support ticket.