IDotD Wiki

A tool for Dawn of the Dragons

Server API

For the following API-calls assume lower case and spaces replaced by hyphens. URLs are therefore build starting with /[server] and adding in the headers related to the task, for example /kongregate/chat-service/update/ .

Chat Service

This group of services handles everything chat-related. These do return error-object with the keys success, message and possibly login.

Success will be false in case of errors and if it is an error that will likely be solved by logging in again, login will be set to true.

Accounts

Get all required information about logged-in users, including yourself. This takes no additional payload of any kind.

The members object contains the rank of each user, organised by chat and then user, while the users object contains a list of active platforms and the user’s name.

Example

Chat 17 with user 1:

{"self":1,"members":{17:{1:Owner}},"users":{1:{name:"Idrinth",platforms:{"k":true,"f":false,"a":false,"n":true}}}

Other Responses

{"success":false,"message":"please login again","login":true}

Create

Creates a new chat with a random password and sets the creating user as chat-owner.

Example

Idrinth-Addition: my chat 9000

Responses

{"success":false,"message":"please login again"}

{"success":false,"message":"the message didn't use an allowed format"

{"success":true,"data":{name:"name",access:"Owner",pass:"pass"}

Delete

Takes the chat-id as the next path-part and deletes a chat if you are an Owner.

Responses

{"success":false,"message":"please login again","login":true}

{"success":false,"message":"the request didn't use an allowed format"}

{"success":false,"message":"you lack the right to delete this chat."}

{"success":true}

Join

Sends chatjoin-data via the header Idrinth-addition and gets the necessary data back to build the chat-gui if sucessfull.

Example

Idrinth-Addition: {"id":"22","pass":"halloWelt"}

Responses

{"success":false,"message":"please login again","login":true}

{"success":false,"message":"the message didn't use an allowed format."}

{"success":false,"message":"You need to supply an ID and a password"}

{"success":false,"message":"You are banned from this chat"}

{"success":true,"data":{"id":22,"name":"halloWelt","pass":"halloWelt"}}

{"success":false,"message":"Password and ID do not match"}

Login

A query containing a username and password in the Idrinth-Addition-header.

Example

Idrinth-Addition: {"user":"Tester","pass":"Password"}

Responses

{"success":false,"message":"data not provided, either username or password is empty"}

{"success":false,"message":"User unknown, do you want to register?","allow-reg":true}

{"success":false,"message":"Combination of username and password unknown."}

{"success":true,"data":MyChats()}

My chats

Returns a list of all allowed chats with their names and passwords.

Example

{"1":{"access":"User","pass":"Hallo","name":"World"}}

Rank

Changes the rank of a specific user in a specific chat. Chat and user to be changed need to be submitted as a json encoded value of the header Idrinth-Addition.

Possible ranks are:

Example:

Idrinth-Addition: {"user":1,chat:"1","access":""}

Responses

{"success":false,"message":"please login again","login":true}

{"success":false,"message":"the message didn't use an allowed format"}

{"success":false,"message":"you can not change this user's rights in the desired way')

{"success":true,"message":"User's rights changed"}

Register

A query containing a username and password in the Idrinth-Addition-header.

Example

Idrinth-Addition: {"user":"Tester","pass":"Password"}

Responses

{"success":true,"data":MyChats()}

{"success":false,"message":"You need to provide data for registering in"}

{"success":false,"message":"You need to provide data for registering in"}

{"success":false,"message":"The given login already exists, please choose another one"}

Update

This handles the sending of new messages as well as retrieving messages send by others. The first are send as a json object of messages per chat, while the later is handled with sending the highest known message id.

Example

Idrinth-Addition: {"messages":[{"chat":1,"text":"Hi, anyone around?"}],"maxId":111}

Responses

{"success":false,"message":"please login again","login":true)

{"success":false,"message":"the message didn't use an allowed format"}

{"messages":{"1":{"112":{"time" => "2016-07-25 15:09:08","user":1,"text":"Hi, anyone around?"}}}}

Whisper

The whisper service takes a json-object wrapped in a post request.

Example

{"messages":[{"to":333,"message":"you there?"}],"akn:[1,3,4,55,6]}

Responses

{"success":false,"message":"please login again","login":true)

{"success":false,"message":"the message didn't use an allowed format"}

[{"id":11,created:"2016-08-01 00:01:09","from":333,"message":"yes..."},{"id":23,created:"2016-08-01 00:01:09","from":23,"message":"could you kill your jorm please? it's full."}]

Raid Service

The information about what raids to join is supplied with an added path-part of comma seperated favorite-ids. Also the Idrinth-Addition-header is send with ids of already joined raids to reduce overhead.

If a known raid is dead it’ll be re-added with the property “delete” and the value 1 in it to clean it out of the known raids client side.

Example

URL: https://dotd.idrinth.de/kongregate/raid-service/1,3,99/

Idrinth-Addition: [11,23,45,56,78678,678,678]

Responses

No raids

{}

Raids

{"12345":{"difficulty":1,"name":"MySummoner","raid":"Horgrak","aid":12345,"raidId":889,"hash":"wx9g"}}

I am alive

A single call for tracking purposes, to see if there’s anyone using the script. It takes a pseudo UUID as the next part of the path and returns nothing. UUIDs are checked to match the following regex:

^[a-z0-9]{4}-[a-z0-9]{8}-[a-z0-9]{12}-[a-z0-9]{16}-[a-z0-9]{20}-[a-z0-9]{24}$

Tiers Service

Provides all raid’s tier data in a json object of raid-objects. This is a GET request, that does not take any additional parameters.

The key for those objects is the lower case name combines with the lower case short name if they differ sufficiently. Jormungan has the key “jormungan the sea-storm”, while “Badland Ambusher (Badlands)” is providing both version since they differ. On the upper level each objects provides the following fields:

Example:

This is an example for Briareus the Butcher. Other raid-bosses follow the same structure.

{"name":"Briareus the Butcher","url":"briareus-7","types":["Ogre"],"n":["263000","300000","450000","600000","800000","1250000","1750000"],"os":{"n":"263000","h":"315000","l":"368000","nm":"473000"},"fsOs":{"n":"263000","h":"315000","l":"368000","nm":"1080000"},"fs":{"n":450000,"h":562500,"l":720000,"nm":900000},"epics":{"n":["1.0","1.0","1.0","2.0","2.5","3.0","3.5"],"h":["1.0","1.0","1.0","2.0","2.5","3.0","3.5"],"l":["1.0","1.0","1.0","2.0","2.5","3.0","3.5"],"nm":["1.0","1.0","1.0","2.0","2.5","3.0","3.5"]},"loot":{"n":[{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"2","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"4","s":"0.0"}],"h":[{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"2","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"4","s":"0.0"}],"l":[{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"2","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"4","s":"0.0"}],"nm":[{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"1","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"2","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"3","s":"0.0"},{"c":"0.0","u":"0.0","l":"0.0","e":"4","s":"0.0"}]},"h":["315000","360000","540000","720000","960000","1500000","2100000"],"l":["368000","420000","630000","840000","1120000","1750000","2450000"],"nm":["473000","540000","810000","1080000","1440000","2250000","3150000"],"ap":450000}

Users Service

Provides access to register platform names and request known ones.

Add

A get-request to add a username, that is appended as the next “folder” in this request. Does not return anything.

Get

A get-request, that returns a list of users grouped by their kong-names. This is meant to be called multiple types to update the content on the client’s side.

A single user’s data is grouped by his lower-case Kongregate username and then in turn has a sub-object for each server that he is on. These objects provide the following keys:

Example

{"bjalpha":{"kongregate":{"guildId":"645","id":"27341","level":"2658","updated":"2016-07-24 16:07:01","class":"12","name":"Idrinth","7day":"31","30day":"344"},"world":{"guildId":"0","id":"39135125","level":"7","updated":"2016-07-25 07:52:01","class":"3","name":"i","7day":"0","30day":"0"}}}

Init

Reduces pseudo-static data, that is not meant to be requeried. This is a list of guild names and class names.

Example

{"classes":{"4":"Adventurer"},"guilds":{"kongregate":{"0":"[Sytem:Guildless]"},"world":{"0":"[System Guildless""}}}

War Service

The War service returns two different kinds of information, for one pure statistics and tipps, including magics to use, for each boss in the War and on the other hand War raids that a person wants to join.

The information about what raids to join is supplied with an added path-part of comma-seperated raid ids. Also the Idrinth-Addition-header is send with ids of already joined raids to reduce overhead.

Example

URL: https://dotd.idrinth.de/kongregate/war-service/1,3,99/

Idrinth-Addition: [11,23,45,56,78678,678,678]

Responses

No war running

{}

War up

{"raids:{"12345":{"difficulty":1,"name":"MySummoner","raid":"Horgrak","aid":12345,"raidId":889,"hash":"wx9g"}},"stats":{"1":{"boss":1,"amount":678,"name":"Horgrak","magics":"blinding_light-125,dragons_breath-93"}}}

Add Raid Service

The add raid service provides a simple option to submit raids without having to enter chats. The id and hash need to be added to the url.

Example

Url: https://dotd.idrinth.de/facebook/add-raid-service/11111/9buSZIKtAJ/

Responses

The response will return a boolean to signal success.

[{“11111”:false}]