1. #1
    Deleted

    WoW Website API question

    Heya,

    The US forums have a forum dedicated to the Community Platform API for developers (us.battle.net/wow/en/forum/2626217/) and since we have no forum on the EU side for this I'm posting it here. (also tried posting in the EU technical support forum, but.. ye)

    Does anyone know if the API provides information on each role a certain class can perform? I wanna save myself the hassle of coding it in manually (in case.. in a possibly very rare occasion.. this would change or in the case that certain id's would change).

    The API for classes ([us.battle.net/api/wow/data/character/classes) does not mention it. However when going into a certain profile's talents there is a "role" key defined. (eg: eu.battle.net/api/wow/character/Ravencrest/Aetava?fields=talents ).

    tldr: how to get each possible role for each possible class? (if possible).

    Greetings,
    Aet

  2. #2
    Deleted
    Thanks for the reply!

    I indeed used arrays to store it. I guess it will never change so it does not really matter that much.

    (in case of future Google searches, my PHP solution
    Code:
    public static $classRoles = array(
            self::CLASS_WARRIOR => array(self::ROLE_DPS, self::ROLE_TANK),
            self::CLASS_PALADIN => array(self::ROLE_DPS, self::ROLE_TANK, self::ROLE_HEALING),
            self::CLASS_HUNTER => array(self::ROLE_DPS),
            self::CLASS_ROGUE => array(self::ROLE_DPS),
            self::CLASS_PRIEST => array(self::ROLE_DPS, self::ROLE_HEALING),
            self::CLASS_DEATHKNIGHT => array(self::ROLE_DPS, self::ROLE_TANK),
            self::CLASS_SHAMAN => array(self::ROLE_DPS, self::ROLE_HEALING),
            self::CLASS_MAGE => array(self::ROLE_DPS),
            self::CLASS_WARLOCK => array(self::ROLE_DPS),
            self::CLASS_MONK => array(self::ROLE_DPS, self::ROLE_TANK, self::ROLE_HEALING),
            self::CLASS_DRUID => array(self::ROLE_DPS, self::ROLE_TANK, self::ROLE_HEALING),
      );

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •