the unofficial
A quick and easy portal to getting all the character information you need.
Currently, the only method available is to get a player's personal and character info, as seen on RealmEye in JSON (or JSONP) format.
To run this API on your server, you will need to ensure you have the proper software installed, and correctly set up your environment.
To run the API, you will need the following installed on your server:
- Latest Apache (known working on 2.4.20)
- Latest PHP (known working on 7.1.5)
- recommended: Git (known working with 2.7.4)
Once the above are installed and configured, create your desired endpoint
directory within your webroot and git clone
this repository.
This application provides a sample set of configurations in config.ini.sample
as a basis for application configuration. Though it runs fine without any
configuration file provided, you may specify your own in a config.ini
file.
The available configuration keys and their functions are as follows:
allowed_manual_deploy_ips[]
: Each entry is a string defining an IP address which is allowed to trigger deployments manually. This string may contain wildcards—*
—which may substitute for any part of the IP address being checked. For example,127.*
would allow127.0.0.1
.REALMEYE-API_SECRET
: This is the secret string configured to authenticate automated GitHub deployments. (read more below)emit_version_header
: A boolean which toggles the output of theRealmEye-API-Version
header. If absent, the header will be emitted.log_file_name
: A string defining the name of log files stored inlogs/
.log_level
: A string which sets the limiting level for statements to be logged via the application logger. Allowed values are:'off'
'fatal'
'error'
'warn'
'info'
'debug'
'trace'
For ease of maintenance, a deployment script has been provided for
administrators. To make use of it, set allowed_manual_deploy_ips
and
REALMEYE-API_SECRET
in your config.ini
file, per the
Configuration section above.
For more information on setting up a webhook for automated deployment, read GitHub's articles on Webhooks, and on Securing Webhooks.
Name | Method | Description |
---|---|---|
/ | GET | Get player and character data. |
Name | Data Type | Required / Optional | Description |
---|---|---|---|
player | string | optional | Player name. (case insensitive) If not included, id is required |
id | string | optional | 11-character id as it appears in an unnamed player's RealmEye URL. If not included, player is requred |
filter | string | optional |
Accepts a space-separated string of variable names, with an optional leading hyphen.
When not prefaced with a hyphen, directs the API to return only values with keys appearing in the given list.
When prefaced with a hyphen, directs the API to return all usual values except those matching the provided keys.
Note: values nested within arrays will not be displayed unless their parent key is listed as well. (ex. class for characters will not be displayed unless character is also passed within the list)
|
callback | string | optional | JavaScript callback function name. If passed, response will be served as JSONP |
pretty | N/A | optional | Empty parameter. If passed, output will be provided in a line-and-tab separated format |
Name | Type | Definition |
---|---|---|
player | string | Player name, cased as seen on their profile |
donator | boolean | true if the player donated to Realmeye, false otherwise |
chars | int | Count of characters seen on RealmEye. If characters are hidden, this is -1 |
skins | int | Number of skins unlocked. If characters are hidden, this is -1 |
skins_rank | int | Rank of number of skins. If characters are hidden, this is -1 |
fame | int | Total character fame |
fame_rank | int | Fame placement |
exp | int | Total character experience |
exp_rank | int | Experience placement |
rank | int | Class quests completed |
account_fame | int | Account fame. (aka 'dead' fame) |
account_fame_rank | int | Account fame placement |
guild | string | Guild name. This value is "" for guildless players |
guild_confirmed | bool | true if the user is confirmed their guild, false otherwise. This should only be false for members of guilds whose names contain spaces, and who have not been "confirmed" as a guild member in RealmEye |
guild_rank | string | Guild position title. (Initiate, Member, Officer, Leader, or Founder) This value is "" for guildless players |
created | string | Approximation of account age. May display "hidden" by player preference |
player_last_seen | string | "{datetime} at {server} as {class}" . May display "hidden" by player preference |
desc1, desc2, desc3 | string | Full strings of each description line (by numbered line) of the player. If the given line is empty, this value is "" |
characters | array | Array of displayed characters. If characters are hidden, this array will be empty and characters_hidden will be true |
characters_hidden | boolean | true if the player's characters are hidden, false otherwise |
Name | Type | Definition |
---|---|---|
data_pet_id | int | Item id of the given pet. -1 if character has no pet |
pet | string | Pet type. (not player-assigned pet name) "" if character has no pet |
character_dyes | dict |
Dictionary of character dyes as strings and dye data as ints.clothing_dye is the name of the large cloth/dyeaccessory_dye is the name of the small cloth/dyedata_clothing_dye is the numbered id of the color, not of the item. (for use in rendering character images, for example)data_accessory_dye is the numbered id of the color, not of the item. (for use in rendering charcter images, for example)Data values are 0 for undyed characters. Cloth/dye names are "" if un-dyed
|
class | string | Class name |
data_class_id | int | id assigned to that character's class |
data_skin_id | int | id assigned to that character's skin. 0 if character is using the class's default skin |
level | int | Character level |
cqc | int | Class quests completed on character's class |
fame | int | Fame on character |
exp | int | Experience on character |
place | int | Character rank placement |
equips | dict |
Dictionary of equipments as strings and item id s as ints.Name keys are weapon, ability, armor, and ring. Data-variable keys are data_weapon_id, data_ability_id, data_armor_id, and data_ring_id. Empty slots' values are "Empty slot" and -1 , respectively.
|
backpack | boolean | true if character has a backpack, false otherwise |
stats_maxed | int | Number (out of 8) of stats maxed on character |
stats | dict | Dictionary of individual base stats (hp, mp, attack, defense, speed, vitality, wisdom, and dexterity) as ints. |
last_seen | string | "YYYY-MM-DD hh:mm:ss" . If last-seen time/location is hidden, this value is "" |
last_server | string | Full name of last server seen in. (e.g. "USNorthWest" ) If last-seen time/location is hidden, this value is "" |
GET /?player=joanofarc
GET /?id=PdT6pPU7qBN&callback=processPlayer
GET /?player=joanofarc&filter=player+chars+fame
GET /?player=joanofarc&filter=-characters+desc1+desc2+desc3
GET /?player=joanofarc&pretty
For player=joanofarc
:
{
"account_fame" : 35662,
"account_fame_rank" : 264,
"characters" : [
{
"backpack" : true,
"character_dyes" : {
"accessory_dye" : "Small Sweater Cloth"
"clothing_dye" : "Large Blue Lace Cloth",
"data_accessory_dye" : 83886083,
"data_clothing_dye" : 150994946,
},
"class" : "Rogue",
"cqc" : 4,
"data_class_id" : 768,
"data_pet_id" : 32611,
"data_skin_id" : 913,
"equips" : {
"ability" : "Cloak of Ghostly Concealment",
"armor" : "Spectral Cloth Armor",
"data_ability_id" : 2855,
"data_armor_id" : 3112,
"data_ring_id" : 2978,
"data_weapon_id" : 3082,
"ring" : "Ring of the Pyramid"
"weapon" : "Dirk of Cronus",
},
"exp" : 805974,
"fame" : 608,
"last_seen" : "2013-08-02 07:04:16",
"last_server" : "USNorthWest"
"level" : 20,
"pet" : "Gummy Bear",
"place" : 589,
"stats" : {
"attack" : 50,
"defense" : 25,
"dexterity" : 75
"hp" : 720,
"mp" : 252,
"speed" : 75,
"vitality" : 40,
"wisdom" : 50,
},
"stats_maxed" : 8
},
//... (all other characters)
],
"characters_hidden" : false,
"chars" : 13,
"created" : "~1 year and 137 days ago",
"desc1" : "I fight for the glory of France.",
"desc2" : "https://www.youtube.com/nightfirecat/",
"desc3" : "https://JoanOfArcRotMG.wordpress.com/",
"donator" : true,
"exp" : 13152470,
"exp_rank" : 513,
"fame" : 8300,
"fame_rank" : 497,
"guild" : "Night Owls",
"guild_rank" : "Officer",
"player" : "JoanOfArc",
"player_last_seen" : "2013-08-02 07:04:16 at USNorthWest as Rogue",
"rank" : 62,
"skins" : 0,
"skins_rank" : 103495
}
For player=joanofarc&filter=player+chars+fame
:
{
"chars" : 13,
"fame" : 8300
"player" : "JoanOfArc",
}
For player=joanofarc&filter=-characters+desc1+desc2+desc3
:
{
"account_fame" : 35662,
"account_fame_rank" : 264,
"characters_hidden" : false,
"chars" : 13,
"created" : "~1 year and 137 days ago",
"donator" : true,
"exp" : 13152470,
"exp_rank" : 513,
"fame" : 8300,
"fame_rank" : 497,
"guild" : "Night Owls",
"guild_rank" : "Officer",
"player" : "JoanOfArc",
"player_last_seen" : "2013-08-02 07:04:16 at USNorthWest as Rogue",
"rank" : 62,
"skins" : 0,
"skins_rank" : 103495
}