-
Notifications
You must be signed in to change notification settings - Fork 8
API
id, name, nameForAPI, rules, locale, _, region,
timezone, connectedIDs, englishName, englishNameForAPI
= LibStub("LibRealmInfo"):GetRealmInfo(name, region)
-
name
- string: The name of the realm to query -
realm
- (optional) string: The region to query. If not specified, the player's region will be used.
-
id
- number: the realm ID -
name
- string: the realm name -
nameForAPI
- string: the realm name as displayed when joined with player names, e.g. in chat (without spaces, dashes, etc.) -
rules
- string: one of "Normal" or "Roleplaying" -
locale
- string: the official realm language, corresponds with GetLocale() values - nil
-
region
- string: one of "US", "EU", "KR", "CN" or "TW" -
timezone
- string/nil: for US realms, one of "PST", "MST", "CST", "EST", "BRT", or "AEST" -
connectedIDs
- table/nil: for connected realms, a table containing a list of realm IDs (including the queried realm ID) -
englishName
- string/nil: for non-Latin realm names, the English version of the realm name (eg. "Azuregos" vs "Азурегос") -
englishNameForAPI
- string/nil: for non-Latin realm names, the English version of the realm's name as it appears when appended to player names in-game
-
The locale for European English servers is
enUS
, notenGB
, and European Portuguese isptBR
, notptPT
. These values correspond with the value returned by the GetLocale API function, and with the fact that WoW doesn't have separate translations for these regional variations. -
The 6th return value is always
nil
. Previously it was the name of the realm's battlegroup. However, the Battle.net Developer API (where the data in LibRealmInfo now comes from) does not provide this information, and battlegroups are no longer relevant anyway, so this information has been removed from LibRealmInfo. A nil value is returned in this position for backwards compatibility. -
Connected realm groups often include an unnamed server that is only used to host the connected realm group. The IDs of these servers can be seen in player GUIDs. LibRealmInfo does support these servers, but only to provide region information; no other information would be relevant, as these servers are not actually realms and have no other intrinsic properties.
-
English equivalent names are provided for Russian, Korean, and Taiwanese realms; and also for a few French realms whose names include non-ASCII punctuation symbols.
Realm info is obtained from the Blizzard Developer API for accuracy, but getting info about Chinese realms would require a separate Chinese Battle.net account, which I do not have. The info for Chinese realms in LibRealmInfo is therefore the old manually compiled data, which may be inaccurate or outdated, and info about connected realms is missing entirely. If you have a Chinese Battle.net account and are willing to help, please open a ticket or email me.
- PST = UTC-8 = US Pacific Standard Time
- MST = UTC-7 = US Mountain Standard Time
- CST = UTC-6 = US Central Standard Time, also used on Latin American servers
- EST = UTC-5 = US Eastern Standard Time
- BRT = UTC-3 = Brazil Time
- AEST = UTC+10 = Australian Eastern Standard Time, used on Oceanic servers
LibRealmInfo does not provide timezone information for other regions, as all realms within a given non-US region use the same timezone. For the curious, European servers are on Central European Time (UTC+1) including Russian servers; Chinese and Taiwanese servers are on China Standard Time (UTC+8); and Korean servers are on Korea Standard Time (UTC+9).
id, name, nameForAPI, rules, locale, _, region,
timezone, connectedIDs, englishName, englishNameForAPI
= LibStub("LibRealmInfo"):GetRealmInfoByID(id)
-
id
- number: The ID for the realm to query (strings will be converted to numbers)
Same as GetRealmInfo.
id, name, nameForAPI, rules, locale, _, region,
timezone, connectedIDs, englishName, englishNameForAPI
= LibStub("LibRealmInfo"):GetRealmInfoByGUID(guid)
-
guid
- string: The GUID of the unit whose realm to query.
Same as GetRealmInfo.
id, name, nameForAPI, rules, locale, _, region,
timezone, connectedIDs, englishName, englishNameForAPI
= LibStub("LibRealmInfo"):GetRealmInfoByUnit(unit)
-
unit
- string: The unit token (eg. "target") of the unit whose realm to query.
Same as GetRealmInfo.