#dAmnIdlers API!

5 min read

Deviation Actions

3 Favourites
10 Comments
3K Views
So, for those of you who are aware of the IdleRPG I've been running for dAmn named dAmnIdlers, you should know that there's a website (which I've recently updated) that can be found at this location which has a listing of all the registered users, as well as information on each user. For the developers among you who would like to integrate some stats into your works (bots, applications, websites, etc) I wrote a simple API to obtain information related to the users of  #dAmnIdlers.

The script can be found here and using it is quite simple. There are two important variables that you can pass to it. The first is fmt, which stands for format. Currently, the supported formats are PHP (which returns a PHP array) and JSON (which returns a JSON object. To get the full listing of users in JSON format, you would use the URL http://damnidlers.shadowkitsune.net/database.php?fmt=json , and for PHP format http://damnidlers.shadowkitsune.net/database.php?fmt=php

You will notice that there are three variables (or entries) starting with a dot (.), these hold information about the response. The first, .last_updated returns the time in UTC timezone when the database was last updated. As of now, it is updated every five (5) minutes. The second, .status tells you that the response was successful. This will always be either ok or error. If it's "error", something went wrong. The only exception is when the entire contents of the response are "Server busy", which means something got interrupted. The third variable, .user_count is the total number of registered users (81 at this time). Other than these, every other entry is information on a unique user.

Aside from this, there is one other variable that can be passed to the script: user. This would be a username to look up, in which case you will be returned information on that specific user, and only them. So, to look up my stats in JSON format, you would request http://damnidlers.shadowkitsune.net/database.php?user=divinityarcane&fmt=json

Upon getting a response, you should see something like {    ".last_updated": "May 14 2013 06:45:01 UTC",    ".status": "ok",    "Alignment": "dark",    "Class": "Whiskey",    "Idled": 4082571,    "Joined": 1363814004,    "Level": 55,    "Penalized": 4007495.854712,    "RealName": "DivinityArcane",    "ToLevel": 730603.22204584 }

Idled, Penalized, and ToLevel are times in seconds. Joined is a UTC timestamp of the time they joined. RealName is the real capitalization of the user's name. Level is their level. Class is their class in-game. Alignment is their alignment in-game. .status is "ok" if the user exists, and "error" if they do not.


Hopefully this API will prove useful to people looking to implement something fun related to dAmnIdlers! I certainly hope to see some of it :)


The source to the API can be found here. Similarly, the source to the user stats page can be found here.









Edit: If you're looking to contribute to #dAmnIdlers, you can donate a few cents towards the server costs. It costs around $65 a month to run my servers, but I usually cover the $50 chunk from my bank. If you want to contribute towards the other $15, go right ahead! I'd be more than grateful to receive that shiny penny to keep the project running strong.



Published:
© 2013 - 2021 DivinityArcane
Comments10
Join the community to add your comment. Already a deviant? Log In
KiFighter's avatar
hi, im impatient and would like to join to newbies and not guest... how do i do that?

DivinityArcane's avatar
Hi there.

Please place a request here and I will approve it as soon as I see it.
KiFighter's avatar
DivinityArcane's avatar
You've been approved.

Enjoy the game!
RetardedMudkipz's avatar
UNBAN ME FROM DAMNIDLERS
DivinityArcane's avatar
I reviewed with other staff as to why you were banned. According to them, you spammed the #DataShare channel on dAmn. That channel is not for users to join, and talking in it is a banning offence. As to why this has gotten you banned in #dAmnIdlers, it needs to be discussed.

If you wish to appeal your ban, you may come to #dAmnIdlersStaff and discuss it with staff.


Have a nice day.
RetardedMudkipz's avatar
Im also banned in #dAmnIdlersStaff
Im not the one who spammed
and i dont know whats datashare

Maybe my brother
DivinityArcane's avatar
Hello,

I've unbanned you from #dAmnIdlersStaff. Please join now.
DivinityArcane's avatar
Hi there.

Why are you banned?
Join the community to add your comment. Already a deviant? Log In