-
Contributor
WDAPI - WoW Database API
WDAPI is a Spring-based RESTful server that communicates with MySQL to receive requests and respond to them with database information.
All responses are in json format.
It works like so:
Current mappings include:
Code:
/newaccount
Parameters:
username: the username of the new account
password: the hashed password of the new account
Returns:
True if the creation was successful, false if not
/realms
Returns:
All of the realms
/updatepassword
Parameters:
username: the username of the account
password: the new hashed password
Returns:
True if the creation was successful, false if not
/allcharacters
Returns:
All of the characters
/getcharacter
Parameters:
name: the name of the character
Returns:
Information about the character
/gettoken
Parameters:
username: the username of the WDAPI admin account
password: the password of the WDAPI admin account
Returns:
The current session token
/allitems
Returns:All items
/getitem
Parameters:
entry: the entry ID of the item
Returns:
The item with the specified entry ID
/getmail
Parameters:
charname: the character name of which you want to get the mail
Returns:
The list of letters in the character's mailbox
/login
Parameters:
username: the username of the private server account
password: the password of the private server account
Returns:
The account information if the log in was successful, otherwise null
The application is written in Java, which means it's cross-platform. Start by navigating to the WDAPI directory and run:
Code:
java -jar wdapi.jar
To run it in background on Linux, run this instead:
Code:
nohup java -jar wdapi.jar &
When sending a request to the server you will need to specify a header.
The header name is "token".
The header value is the token you got when starting WDAPI. It is also located in token.txt in the same directory as WDAPI.
In the same directory as there are two .json files that are used for configuration. It's important to specify what admin username and password you want, so the /gettoken will work correctly.
Download:
Click me
Installation:
Linux (in bash):
Download the .zip:
Code:
wget "http://viggolunden.com/wdapi/wdapi.zip"
Unzip it:
Run it (in background):
Code:
nohup java -jar "wdapi 0.1.jar" &
Windows
Download and unzip the file.
Run it from command prompt.
Enjoy!
Last edited by Zaxer; 09-24-2016 at 10:24 AM.
-
Post Thanks / Like - 1 Thanks
stoneharry (1 members gave Thanks to Zaxer for this useful post)
-
Cool idea, gives a good API for providing this functionality to players; probably through a website interface.
-
Contributor
Originally Posted by
stoneharry
Cool idea, gives a good API for providing this functionality to players; probably through a website interface.
Thanks! Added download link.