Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An easy way to access your character data via RealmEye.
PHP
branch: master
Failed to load latest commit information.
0.1 v0.3 push; fixes #2, fixes #8
0.2 added class/skin data_vars; fixes #11
0.3 added stats
LICENSE Initial commit
README.md added stats
items.php replaced items definitions, now auto-updates; fixes #10

README.md

the unofficial

RealmEye API

A quick and easy portal to getting all the character information you need.

How to use

Currently, the only method available is to get a player's personal and character info, as seen on RealmEye in JSON (or JSONP) format.


Request

Name Method Description
http://webhost.ischool.uw.edu/~joatwood/realmeye_api/ GET Get player and character data.

Parameters

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
data_vars boolean optional If true is passed, all relevant data-* attributes will be returned (see below for examples of such values)
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 only to return values with keys appearing in the given list. When prefaced with a hyphen, directs the API to return all usual values with keys not listed.

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

Response values

Name Type Definition
player string Player name, cased as seen on their profile
donator boolean (string) "true" if the player donated to Realmeye, "false" otherwise
chars int / string Count of characters seen on RealmEye. If characters are hidden, returns "N/A"
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. Not present for guildless players
guild_rank string Guild position title. (Initiate, Member, Officer, Leader, or Founder) Not present for guildless players
created string Approximation of account age
last_seen string "{datetime} at {server} as {class}". If last-seen time/location is hidden, returns "hidden"
desc1, desc2, desc3 string Full strings of each description line (by numbered line) of the player. If the given line is empty, returns ""
characters array / string Array of displayed characters. If characters are hidden, returns "hidden"

character

Name Type Definition
data_pet_id int Item id of the given pet. -1 if character has no pet (passed only if data_vars is true)
pet string Pet type (not player-assigned pet name). "" if character has no pet
character_dyes dict List of character dyes as strings.
data_clothing_dye is the numbered id of the color, not of the item. (for use in rendering character images, for example)
clothing_dye is the name of the large cloth/dye
data_accessory_dye is the numbered id of the color, not of the item. (for use in rendering charcter images, for example)
accessory_dye is the name of the small cloth/dye

Data values are passed only if data_vars is true, and 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 (passed only if data_vars is true)
data_skin_id int id assigned to that character's skin. 0 if character is using the class's default skin (passed only if data_vars is true)
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 List of item ids as ints (if data_vars was true), and equipments as strings.
Data-variable keys are data_weapon_id, data_ability_id, data_armor_id, and data_ring_id. Name keys are weapon, ability, armor, and ring.
Empty slots' values are -1 and "Empty slot", respectively.
backpack boolean (string) "true" if character has a backpack, "false" otherwise
stats_maxed int Number (out of 8) of stats maxed on character
stats dict List of individual base stats (hp, mp, attack, defense, speed, vitality, wisdom, and dexterity) as ints.
last_seen datetime "{year}-{month}-{day} {hour}:{minute}:{second}". If last-seen time/location is hidden, returns ""
last_server string Full name of last server seen in. (e.g. "USNorthWest") If last-seen time/location is hidden, returns ""

Sample requests

http://webhost.ischool.uw.edu/~joatwood/realmeye_api/?player=joanofarc
http://webhost.ischool.uw.edu/~joatwood/realmeye_api/?id=PdT6pPU7qBN&callback=processPlayer
http://webhost.ischool.uw.edu/~joatwood/realmeye_api/?player=joanofarc&filter=player+chars+fame
http://webhost.ischool.uw.edu/~joatwood/realmeye_api/?player=joanofarc&filter=-characters+desc1+desc2+desc3

Sample responses

For player=joanofarc&data_vars=true:

{
    "player"               : "JoanOfArc",
    "chars"                : 13,
    "fame"                 : 8300,
    "fame_rank"            : 497,
    "exp"                  : 13152470,
    "exp_rank"             : 513,
    "rank"                 : 62,
    "account_fame"         : 35662,
    "account_fame_rank"    : 264,
    "guild"                : "Night Owls",
    "guild_rank"           : "Officer",
    "created"              : "~1 year and 137 days ago",
    "last_seen"            : "2013-08-02 07:04:16 at USNorthWest as Rogue",
    "desc1"                : "I fight for the glory of France.",
    "desc2"                : "https:\/\/www.youtube.com\/nightfirecat\/",
    "desc3"                : "https:\/\/JoanOfArcRotMG.wordpress.com\/",
    "characters"           : [
        {
            "data_pet_id"          : 32611,
            "pet"                  : "Gummy Bear",
            "character_dyes"       : {
                "data_clothing_dye"    : 150994946,
                "clothing_dye"         : "Large Blue Lace Cloth",
                "data_accessory_dye"   : 83886083,
                "accessory_dye"        : "Small Sweater Cloth"
            },
            "class"                : "Rogue",
            "level"                : 20,
            "cqc"                  : 4,
            "fame"                 : 608,
            "exp"                  : 805974,
            "place"                : 589,
            "equips"               : {
                "data_weapon_id"       : 3082,
                "weapon"               : "Dirk of Cronus",
                "data_ability_id"      : 2855,
                "ability"              : "Cloak of Ghostly Concealment",
                "data_armor_id"        : 3112,
                "armor"                : "Spectral Cloth Armor",
                "data_ring_id"         : 2978,
                "ring"                 : "Ring of the Pyramid"
            },
            "backpack"             : "true",
            "stats_maxed"          : 8,
            "stats"                : {
                "hp"                   : 720,
                "mp"                   : 252,
                "attack"               : 50,
                "defense"              : 25,
                "speed"                : 75,
                "vitality"             : 40,
                "wisdom"               : 50,
                "dexterity"            : 75
            },
            "last_seen"            : "2013-08-02 07:04:16",
            "last_server"          : "USNorthWest"
        },
        //... (all other characters)
    ]
}

For player=joanofarc&filter=player+chars+fame:

{
    "player"               : "JoanOfArc",
    "chars"                : 13,
    "fame"                 : 8300
}

For player=joanofarc&filter=-characters+desc1+desc2+desc3:

{
    "player"               : "JoanOfArc",
    "chars"                : 13,
    "fame"                 : 8300,
    "fame_rank"            : 497,
    "exp"                  : 13152470,
    "exp_rank"             : 513,
    "rank"                 : 62,
    "account_fame"         : 35662,
    "account_fame_rank"    : 264,
    "guild"                : "Night Owls",
    "guild_rank"           : "Officer",
    "created"              : "~1 year and 137 days ago",
    "last_seen"            : "2013-08-02 07:04:16 at USNorthWest as Rogue"
}

Changelog

v0.31; 3/31/2014

  • Added the stats field

v0.3; 11/16/2013

  • v0.2 source released
  • Added donator response field
  • Added filtering using the filter parameter
  • Added filtering examples
  • Updated backpack detection to match new HTML structure

v0.2; 09/08/2013

  • v0.1 source released
  • Fixed backpack truthy/falsey values across all versions (outputs strings "true"/"false" instead)
  • Added player description lines to output
  • Added data_vars parameter
  • Version-specific URLs available; base URL redirects to newest available version

v0.1; 08/03/2013

  • Initial instructions; source code not yet added. (needs refactoring/cleanup)
Something went wrong with that request. Please try again.