### Dump Player GUID and Info Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getplayerinfobyguid.md This example demonstrates how to get the GUID of a targeted player and then use GetPlayerInfoByGUID to display their information. This is useful for debugging or inspecting other players. ```lua /dump UnitGUID("target"), GetPlayerInfoByGUID(UnitGUID("target")) ``` -------------------------------- ### Example: GetRFDungeonInfo for Siege of Wyrmrest Temple Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getrfdungeoninfo.md This example shows how to use GetRFDungeonInfo with an index of 2 to get details for the 'The Siege of Wyrmrest Temple' Raid Finder dungeon. ```Lua /dump GetRFDungeonInfo(2) => 416, "The Siege of Wyrmrest Temple", 1, 3, 85, 85, 85, 85, 85, 3, 0, "SIEGEOFWYRMRESTTEMPLE", 1, 25, "Deathwing seeks to destroy Wyrmrest Temple and end the lives of the Dragon Aspects and Thrall.", false, 0, nil, false, "Dragon Soul", 0, false, 967 ``` -------------------------------- ### Get Item Info Instant Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-itemgetiteminfoinstant.md This example demonstrates how to use C_Item.GetItemInfoInstant to retrieve and print information for a specific item ID. It shows the expected output format for itemID, itemType, itemSubType, itemEquipLoc, icon, classID, and subClassID. ```lua /dump GetItemInfoInstant(4306) --[[ Output: [1] = 4306, -- itemID [2] = "Tradeskill", -- itemType [3] = "Cloth", -- itemSubType [4] = "", -- itemEquipLoc [5] = 132905, -- icon [6] = 7, -- classID [7] = 5 -- subclassID ]] ``` -------------------------------- ### Get Source Reforge Stats Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getsourcereforgestats.md This example demonstrates how to call GetSourceReforgeStats and prints the returned stat name, ID, and value. ```Lua /dump GetSourceReforgeStats() => "Spirit", 6, 82, "Haste Rating", 36, 68 ``` -------------------------------- ### Get Voice Session Info Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getvoicesessioninfo.md Example of how to call GetVoiceSessionInfo to retrieve the session name and success status. Ensure the ID provided is valid. ```lua local sessionName, success = GetVoiceSessionInfo(1) ``` -------------------------------- ### Get Channel List Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getchannellist.md Prints the channels the player is currently in. Requires iterating through the returned table with a step of 3. ```lua local channels = {GetChannelList()} for i = 1, #channels, 3 do local id, name, disabled = channels[i], channels[i+1], channels[i+2] print(id, name, disabled) end ``` -------------------------------- ### KBSetup BeginLoading Function Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-kbsetup-beginloading.md Initiates the loading of articles for the knowledge base. This function returns immediately, and events are fired upon completion or failure. ```APIDOC ## KBSetup_BeginLoading ### Description Starts the loading of articles. This function returns immediately. ### Method N/A (This is a function call, not an HTTP request) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Arguments - **articlesPerPage** (number) - Required - Number of articles shown on one page. - **currentPage** (number) - Required - The current page (starts at 1). ### Request Example ```lua KBSetup_BeginLoading(KBASE_NUM_ARTICLES_PER_PAGE, KBASE_CURRENT_PAGE) ``` ### Response #### Success Response None (The function returns nil. Success is indicated by the KNOWLEDGE_BASE_SETUP_LOAD_SUCCESS event.) #### Response Example None ``` -------------------------------- ### StartAuction Chat Command Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-startauction.md This example shows how to execute the StartAuction API directly from the chat window in the game. It requires an item to be placed in the 'Create Auction' panel beforehand. ```Lua /script StartAuction(1,150,1) ``` -------------------------------- ### Get Super Tracked Vignette GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-supertrackgetsupertrackedvignette.md Call this function to retrieve the GUID of the currently super-tracked vignette. No setup is required beyond standard API access. ```Lua vignetteGUID = C_SuperTrack.GetSuperTrackedVignette() ``` -------------------------------- ### StartAuction API Usage Examples Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-startauction.md These examples demonstrate how to use the StartAuction API with different bid, buyout, and runtime values. Note that minBid and buyoutPrice are in copper, and values below 1 silver are not directly supported. ```Lua StartAuction(1,1,1) ``` ```Lua StartAuction(1,10,1) ``` ```Lua StartAuction(1,100,1) ``` ```Lua StartAuction(1,1000,1) ``` ```Lua StartAuction(1,10000,2) ``` ```Lua StartAuction(101,150,3) ``` -------------------------------- ### List Achievements Containing 'flame' Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getfilteredachievementid.md This example demonstrates how to set a search string, get the number of matching achievements, and then iterate through them to print their names. It requires prior setup of the achievement search string. ```Lua SetAchievementSearchString("flame"); local numFiltered = GetNumFilteredAchievements(); for idx = 1, numFiltered do local achievementID = GetFilteredAchievementID(idx); local _, achievementName = GetAchievementInfo(achievementID); print(achievementName); end ``` -------------------------------- ### Example of Globally Unique Identifier (GUID) Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-types.md Provides an example of a hyphen-delimited GUID for uniquely identifying in-game objects. ```lua Creature-0-6-0-11-31146-000136DF91 ``` -------------------------------- ### C_ClickBindings.GetTutorialShown Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-clickbindingsgettutorialshown.md Retrieves the tutorial shown status. ```APIDOC ## C_ClickBindings.GetTutorialShown ### Description Retrieves the tutorial shown status. ### Method GET ### Endpoint /api/C_ClickBindings/GetTutorialShown ### Returns #### Success Response (200) - **tutorialShown** (boolean) - Indicates if the tutorial has been shown. ### Response Example ```json { "tutorialShown": true } ``` ### Patch changes * Added in Patch 9.2.0. ``` -------------------------------- ### Call C_Tutorial.ReturnToTutorialArea Function Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-tutorialreturntotutorialarea.md This snippet shows how to call the ReturnToTutorialArea function within the C_Tutorial system. It is formatted in MediaWiki markdown. ```mediawiki {{wowapi|t=a|namespace=C_Tutorial|system=Tutorial}} Needs summary. C_Tutorial.ReturnToTutorialArea() ==Patch changes== * {{Patch 9.0.1|note=Added.}} ``` -------------------------------- ### Get Summoned Pet GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-petjournalgetsummonedpetguid.md Call this function to get the GUID of the currently summoned battle pet. Returns nil if no pet is summoned. ```Lua summonedPetGUID = C_PetJournal.GetSummonedPetGUID() ``` -------------------------------- ### C_Tutorial.ReturnToTutorialArea Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-tutorialreturntotutorialarea.md This function is part of the C_Tutorial namespace and is used to return the player to the tutorial area. It was added in Patch 9.0.1. ```APIDOC ## C_Tutorial.ReturnToTutorialArea ### Description Returns the player to the tutorial area. ### Method Not applicable (this appears to be a function call within a game API, not a REST endpoint). ### Endpoint Not applicable. ### Parameters None explicitly defined in the provided text. ### Request Example ``` C_Tutorial.ReturnToTutorialArea() ``` ### Response No specific response details are provided in the text. This is likely an in-game function call. ### Patch Changes * {{Patch 9.0.1|note=Added.}} ``` -------------------------------- ### Get Inventory Item Count Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getinventoryitemcount.md This example demonstrates how to get the count of items in the ammo slot and adjust it if it appears empty but returns 1. ```Lua local ammoSlot = GetInventorySlotInfo("AmmoSlot"); local ammoCount = GetInventoryItemCount("player", ammoSlot); if ((ammoCount == 1) and (not GetInventoryItemTexture("player", ammoSlot))) then ammoCount = 0; end; ``` -------------------------------- ### Get Quest Difficulty Color Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getquestdifficultycolor.md This example demonstrates how to get the difficulty color for a quest level and display it in the chat frame. The color is returned as an RGB table. ```lua local colour = GetQuestDifficultyColor(47); DEFAULT_CHAT_FRAME:AddMessage("Your difficulty colour against a target of level 47.", colour.r, colour.g, colour.b); ``` -------------------------------- ### Check for Starter Build - C_ClassTalents.GetHasStarterBuild Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-classtalentsgethasstarterbuild.md Use this function to determine if a starter build is available for the player. It returns a boolean value. ```Lua hasStarterBuild = C_ClassTalents.GetHasStarterBuild() ``` -------------------------------- ### Get Unit GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-unitguid.md Returns the GUID of the unit. Requires a UnitToken as an argument. ```lua guid = UnitGUID(unit) ``` -------------------------------- ### C_Tutorial API Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/world-of-warcraft-api.md Endpoints for managing tutorial states. ```APIDOC ## POST /api/C_Tutorial/AbandonTutorialArea ### Description Abandons the current tutorial area. ### Method POST ### Endpoint /api/C_Tutorial/AbandonTutorialArea ``` ```APIDOC ## POST /api/C_Tutorial/ReturnToTutorialArea ### Description Returns the player to the tutorial area. ### Method POST ### Endpoint /api/C_Tutorial/ReturnToTutorialArea ``` -------------------------------- ### Get Max Spell Start Recovery Offset Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/global-functions.md Retrieves the maximum offset for spell start recovery. ```APIDOC ## GET /api/GetMaxSpellStartRecoveryOffset ### Description Retrieves the maximum offset value for spell start recovery. ### Method GET ### Endpoint /api/GetMaxSpellStartRecoveryOffset ### Parameters None ### Response #### Success Response (200) - **offset** (number) - The maximum spell start recovery offset. #### Response Example ```json { "offset": 1.5 } ``` ``` -------------------------------- ### Get Tutorial Shown Status - C_ClickBindings Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-clickbindingsgettutorialshown.md Call this function to check if a tutorial has been shown. It returns a boolean value. ```Lua tutorialShown = C_ClickBindings.GetTutorialShown() ``` -------------------------------- ### Get Vignette GUIDs Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-vignetteinfogetvignettes.md Call this function to retrieve an array of vignette GUIDs. This function was added in patch 8.0.1. ```Lua vignetteGUIDs = C_VignetteInfo.GetVignettes() ``` -------------------------------- ### Get Start Location API Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-commentatorgetstartlocation.md Retrieves the starting location (Vector3DMixin) for a specified instance ID. Requires the instanceID as a number. ```lua pos = C_Commentator.GetStartLocation(instanceID) ``` -------------------------------- ### Check if GUID is Player Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-playerinfoguidisplayer.md Use this function to determine if a provided GUID belongs to a player. As of patch 9.0.2, this check is based on the GUID string starting with "Player-". ```Lua isPlayer = C_PlayerInfo.GUIDIsPlayer(guid) ``` -------------------------------- ### Sample Output for Current Affixes Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-mythicplusgetcurrentaffixes.md Example of the table structure returned by C_MythicPlus.GetCurrentAffixes, showing affixes with their IDs and season IDs. ```lua { { id = 10, seasonID = 0 }, { id = 135, seasonID = 0 }, { id = 6, seasonID = 0 } } ``` -------------------------------- ### Example: Display Player Armor Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-unitarmor.md An example demonstrating how to retrieve and display the player's current armor and base armor using UnitArmor. ```lua local base, effectiveArmor = UnitArmor("player") print(format("Your current armor is %d (%d base)", effectiveArmor, base)) ``` -------------------------------- ### C_GossipInfo.GetOptions and C_GossipInfo.SelectOption Examples Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-gossipinfogetnumoptions.md Examples demonstrating how to retrieve all gossip options, select the first option, and get the total number of options. ```APIDOC ## Examples for Gossip Options ### Description Provides examples for interacting with gossip options using the C_GossipInfo API. ### Code Examples #### Get all options and print their info: ```lua local options = C_GossipInfo.GetOptions() for _, info in pairs(options) do print(info.name, info.gossipOptionID) end ``` #### Select the first available option: ```lua local options = C_GossipInfo.GetOptions() C_GossipInfo.SelectOption(options[1].gossipOptionID) ``` #### Get the amount of options (alternative to GetNumOptions): ```lua local numOptions = #C_GossipInfo.GetOptions() ``` ### Details These examples utilize `C_GossipInfo.GetOptions()` to retrieve a list of available gossip options and `C_GossipInfo.SelectOption()` to choose a specific option by its ID. The number of options can also be determined by the length of the table returned by `C_GossipInfo.GetOptions()`. ``` -------------------------------- ### Get Item Tooltip Data by GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-tooltipinfogetitembyguid.md Use this function to retrieve detailed tooltip information for an item using its unique identifier (GUID). ```Lua data = C_TooltipInfo.GetItemByGUID(guid) ``` -------------------------------- ### Execute Commodity Purchase via Macro Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-auctionhousestartcommoditiespurchase.md Part two of a macro-formatted example that clicks the initialized secure template to buy commodity items and then uses a timer to click the 'Buy Now' button in the subsequent dialog. This is designed to fit within macro character limits. ```lua /click AHBuyC LeftButton 1 /run C_Timer.After(1, function() AuctionHouseFrame.BuyDialog.BuyNowButton:Click() end) ``` -------------------------------- ### ClearCursor API Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-clearcursor.md This example demonstrates how to clear the cursor and pick up an item. It requires no parameters and returns nothing. ```mediawiki ClearCursor(); PickUpContainerItem(0,1); ``` -------------------------------- ### Get General Channel Local ID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-chatinfogetgeneralchannellocalid.md Call this function to get the local ID for the general chat channel. Requires no specific setup. ```Lua localID = C_ChatInfo.GetGeneralChannelLocalID() ``` -------------------------------- ### Get Follower Info by GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-garrisongetfollowerinfo.md Retrieves and dumps information for a follower using their unique GUID. This method is useful when you have the GUID and want to access follower details. Ensure the follower belongs to the current character. ```lua local followers = C_Garrison.GetFollowers() local guid = followers[1].followerID --local id = followers[1].garrFollowerID DevTools_Dump(C_Garrison.GetFollowerInfo(guid)) ``` ```lua { classAtlas = "GarrMission_ClassIcon-Priest-Discipline", className = "Discipline Priest", classSpec = 124, displayHeight = 0.5, displayIDs = { [1] = { followerPageScale = 1, showWeapon = true, id = 67797 } }, displayScale = 1, followerID = "0x0000000004CBDB61", followerTypeID = 4, garrFollowerID = 856 height = 1, iLevel = 900, isAutoTroop = false, isCollected = true, isFavorite = false, isMaxLevel = true, isSoulbind = false, isTroop = false, level = 45, levelXP = 200000, name = "Calia Menethil", portraitIconID = 1401872, quality = 4, scale = 0.69999998807907, slotSoundKitID = 62813, xp = 60600, } ``` -------------------------------- ### C_Tutorial.AbandonTutorialArea Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-tutorialabandontutorialarea.md Teleports the player from the tutorial area (Exile's Reach) to the capital city. This function is typically called before accepting the starting quest. ```APIDOC ## C_Tutorial.AbandonTutorialArea ### Description Teleports the player from the tutorial area (Exile's Reach) to the capital city. This function is typically called before accepting the starting quest. ### Method N/A (This appears to be a function call within a game API, not a standard HTTP request) ### Endpoint N/A ### Parameters This function does not appear to take any parameters. ### Request Example ``` C_Tutorial.AbandonTutorialArea() ``` ### Response This function does not have a documented response. Its effect is to trigger a teleportation and potentially advance tutorial progression. ### Details * To leave the tutorial area and be teleported to the capital city, this function should be called, followed by accepting the starting quest from Captain Garrick (Alliance) or Warlord Breka Grimaxe (Horde). * If this function is called after accepting the starting quest, the teleportation will occur upon abandoning the quest, completing the quest objective (e.g., destroying a target dummy), or relogging. ### Patch Changes * **Patch 10.1.5**: No longer allows leaving the tutorial area. * **Patch 9.0.1**: Added. ``` -------------------------------- ### Get Item Link by GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-itemgetitemlinkbyguid.md Use this function to obtain a clickable item link by providing its unique GUID. Ensure the itemGUID is a valid string. ```Lua itemLink = C_Item.GetItemLinkByGUID(itemGUID) ``` -------------------------------- ### C_Garrison.StartMission Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-garrisonstartmission.md Starts a mission in the game. ```APIDOC ## C_Garrison.StartMission ### Description Starts a mission. ### Method C_Garrison.StartMission ### Endpoint Not specified, likely an internal game function call. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` C_Garrison.StartMission(missionID) ``` ### Response #### Success Response (200) None specified. #### Response Example None specified. ### Arguments #### missionID - **missionID** (number) - Required - The ID of the mission to start. ### Patch changes * Patch 6.0.2 - Added. ``` -------------------------------- ### Example: GetRFDungeonInfo for Fall of Deathwing Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getrfdungeoninfo.md This example demonstrates how to call GetRFDungeonInfo with an index of 1 to retrieve information about the 'Fall of Deathwing' Raid Finder dungeon. ```Lua /dump GetRFDungeonInfo(1) => 417, "Fall of Deathwing", 1, 3, 85, 85, 85, 85, 85, 3, 0, "FALLOFDEATHWING", 1, 25, "Deathwing must be destroyed, or all is lost.", false, 0, nil, false, "Dragon Soul", 0, false, 967 ``` -------------------------------- ### Get Unit Health Percentage Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-unitpercenthealthfromguid.md Use this function to get the current health percentage of a unit identified by its GUID. Requires the unitGUID as a string argument. ```Lua percentHealth = UnitPercentHealthFromGUID(unitGUID) ``` -------------------------------- ### Start Knowledge Base Article Loading Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-kbsetup-beginloading.md Initiates the loading process for knowledge base articles. This function returns immediately, and success or failure events are fired upon completion. Use this when displaying the knowledge base frame. ```lua KBSetup_BeginLoading(KBASE_NUM_ARTICLES_PER_PAGE, KBASE_CURRENT_PAGE) ``` -------------------------------- ### Play Sound File by FileDataID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-playsound.md This example shows how to play a sound file directly using its FileDataID. ```lua PlaySoundFile(567478) -- by FileDataID ``` -------------------------------- ### Get Installed Conduit ID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-soulbindsgetinstalledconduitid.md Retrieves the ID of the installed conduit for a given soulbind node. Requires the nodeID as a number. Returns the conduitID as a number. ```Lua conduitID = C_Soulbinds.GetInstalledConduitID(nodeID) ``` -------------------------------- ### Get Item Hyperlink with C_WeeklyRewards.GetItemHyperlink Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-weeklyrewardsgetitemhyperlink.md Use this function to get an item's hyperlink by providing its itemDBID. This function is available starting from patch 9.0.1. ```Lua hyperlink = C_WeeklyRewards.GetItemHyperlink(itemDBID) ``` -------------------------------- ### Tutorial API Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/global-functions.md Functions for managing and interacting with in-game tutorials. ```APIDOC ## C_Tutorial.AbandonTutorialArea ### Description Abandons the current tutorial area. ### Method APICALL ### Endpoint C_Tutorial.AbandonTutorialArea ## C_Tutorial.ReturnToTutorialArea ### Description Returns the player to the tutorial area. ### Method APICALL ### Endpoint C_Tutorial.ReturnToTutorialArea ``` -------------------------------- ### Get Item Location by GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-itemgetitemlocation.md Retrieves the location of an item using its unique GUID. Note that item locations for bags in bank bag slots are invalid. ```Lua itemLocation = C_Item.GetItemLocation(itemGUID) ``` -------------------------------- ### C_ClassTalents.GetHasStarterBuild Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-classtalentsgethasstarterbuild.md Retrieves whether the player has a starter build for the current class talents. ```APIDOC ## C_ClassTalents.GetHasStarterBuild ### Description Checks if a starter build is available for the current class talents. ### Method GET ### Endpoint /api/wow/classTalents/hasStarterBuild ### Parameters This function does not take any parameters. ### Request Example ```json { "method": "C_ClassTalents.GetHasStarterBuild" } ``` ### Response #### Success Response (200) - **hasStarterBuild** (boolean) - True if a starter build is available, false otherwise. #### Response Example ```json { "hasStarterBuild": true } ``` ``` -------------------------------- ### C_WowTokenUI.StartTokenSell Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-wowtokenuistarttokensell.md Initiates the process of selling a WoW Token. This function requires a token GUID to identify the specific token to be sold. ```APIDOC ## C_WowTokenUI.StartTokenSell ### Description Initiates the process of selling a WoW Token. This function requires a token GUID to identify the specific token to be sold. ### Method Not specified (likely a client-side function call) ### Endpoint Not applicable (client-side function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None specified #### Response Example None specified ### Arguments #### tokenGUID (string) - Required - The unique identifier for the WoW Token to be sold. ``` -------------------------------- ### Get Tracked Nameplate Cooldown Spells Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-spellbookgettrackednameplatecooldownspells.md Call this function to get an array of spell IDs that are currently being tracked for nameplate cooldowns. No setup or imports are required. ```Lua spellIDs = C_SpellBook.GetTrackedNameplateCooldownSpells() ``` -------------------------------- ### Get Current Item Text Page Number Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-itemtextgetpage.md Call this function after receiving the ITEM_TEXT_READY event to get the current page number. The page number starts at 1. There is no direct function to get the total number of pages. ```Lua {{wowapi}} Returns the page number of the currently displayed page. pageNum = ItemTextGetPage() ``` -------------------------------- ### debugprofilestart Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-debugprofilestart.md Starts a timer for profiling. The final time can be obtained by calling debugprofilestop. ```APIDOC ## debugprofilestart() ### Description Starts a timer for profiling. The final time can be obtained by calling debugprofilestop. ### Method N/A (Function Call) ### Endpoint N/A ### Parameters None ### Request Example ``` debugprofilestart() ``` ### Response N/A (This function initiates an action, it does not return a value directly related to profiling results.) ### Details * Note that the timer does not actually need to be started. This is more of a global "reset" of the timer. * Since it is global, it is probably best to '''never call this function'''. Rather just call debugprofilestop() 2 times and compare the difference. ### See also * {{api|debugprofilestop}} ``` -------------------------------- ### Find Unit Token from GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-unittokenfromguid.md Use this function to get a unit token from a unit GUID. The returned token is unstable and may change, so always confirm it before use. ```Lua {{wowapi}} Finds a unit token that maps to the supplied unit GUID. unitToken = UnitTokenFromGUID(unitGUID) ``` -------------------------------- ### Get Article Header Data Example Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-kbsetup-getarticleheaderdata.md Demonstrates how to call KBSetup_GetArticleHeaderData with an article index and display a message if the article is new. Requires the article index as input. ```lua local id, title, isHot, isNew = KBSetup_GetArticleHeaderData(1) if isNew then ChatFrame1:AddMessage("The article " .. id .. "(" .. title .. ") is new.", 1.0, 1.0, 1.0) end ``` -------------------------------- ### Get Total Matching Guild List Size Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-clubfindergettotalmatchingguildlistsize.md Call this function to get the total number of guilds that match the current filter criteria. No setup or imports are required. ```Lua totalSize = C_ClubFinder.GetTotalMatchingGuildListSize() ``` -------------------------------- ### Example of UseInventoryItem with Trinket Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-useinventoryitem.md Example demonstrating how to use UseInventoryItem with a trinket slot. Note that this requires a button press or keybind due to post-patch 1.6 restrictions. ```Lua UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ) ``` -------------------------------- ### Get Recruiting Club Info by Finder GUID Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-clubfindergetrecruitingclubinfofromclubid.md Use this function to retrieve recruiting club information when you have the club finder's GUID. Requires the clubFinderGUID as a string argument. ```lua clubInfo = C_ClubFinder.GetRecruitingClubInfoFromFinderGUID(clubFinderGUID) ``` -------------------------------- ### C_ClassTalents.SetStarterBuildActive Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-classtalentssetstarterbuildactive.md Activates the Blizzard-defined starter talent build. This build is designed to be effective for most game content. ```APIDOC ## POST C_ClassTalents.SetStarterBuildActive ### Description Switches your active talent loadout to the Starter Build, which is a Blizzard defined talent build, meant to be good enough for most content. ### Method POST ### Endpoint /api/wow/classTalents/setStarterBuildActive ### Parameters #### Query Parameters - **active** (boolean) - Required - Specifies whether to activate the starter build. ### Request Example ```json { "active": true } ``` ### Response #### Success Response (200) - **result** (Enum.LoadConfigResult) - Indicates the outcome of activating the starter build. #### Response Example ```json { "result": "Success" } ``` ### Details You should call C_ClassTalents.UpdateLastSelectedSavedConfigID with your current SpecializationID and Constants.TraitConsts.STARTER_BUILD_TRAIT_CONFIG_ID after the Starter Build has successfully been applied. ``` -------------------------------- ### Iterate and Collapse Trainer Headers Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-collapsetrainerskillline.md This example iterates through all trainer services and collapses those categorized as headers. It demonstrates dynamic collapsing based on service type. ```lua for i = 1, GetNumTrainerServices() do local category = select(3, GetTrainerServiceInfo(i)) if category == "header" then CollapseTrainerSkillLine(i) end end ``` -------------------------------- ### TargetPriorityHighlightStart API Usage Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-targetpriorityhighlightstart.md This snippet shows the basic structure for calling the TargetPriorityHighlightStart function. The 'useStartDelay' argument is optional and defaults to false. ```mediawiki {{wowapi|t=a|system=TargetScript}} Needs summary. TargetPriorityHighlightStart([useStartDelay]) ==Arguments== :;useStartDelay:{{apitype|boolean?|default=false}} ``` -------------------------------- ### Get Destination Reforge Stats Example 2 Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getdestinationreforgestats.md Retrieves destination reforge stats for a different source stat and value. This example demonstrates the API with alternative input parameters. ```lua /dump GetSourceReforgeStats(36, 68) ``` -------------------------------- ### Iterate and Print Skill Lines Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getskilllineinfo.md Example demonstrating how to iterate through all available skill lines and print their information using GetNumSkillLines and GetSkillLineInfo. ```Lua /run for i = 1, GetNumSkillLines() do print(i, GetSkillLineInfo(i)) end ``` -------------------------------- ### Get Shapeshift Form Cooldown Information Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getshapeshiftformcooldown.md Use this function to get cooldown details for a specific shapeshift form. It returns the start time, duration, and active status of the cooldown. ```Lua local startTime, duration, isActive = GetShapeshiftFormCooldown(1) if isActive then print("Not Active") else print(string.format("Form 1 has %f seconds remaining", startTime + duration - GetTime())) end ``` -------------------------------- ### C_PlayerInfo.IsPlayerEligibleForNPEv2 Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-playerinfoisplayereligiblefornpev2.md Checks if the player is eligible for the updated new player experience tutorial. Returns true if eligible, or false with a reason string if not. ```APIDOC ## C_PlayerInfo.IsPlayerEligibleForNPEv2 ### Description Returns true if the player is eligible for the updated new player experience tutorial, or false and a reasons string if not. ### Method N/A (This appears to be a client-side function call, not a typical HTTP API endpoint) ### Endpoint N/A ### Parameters This function does not appear to take any parameters. ### Request Example ```lua C_PlayerInfo.IsPlayerEligibleForNPEv2() ``` ### Response #### Success Response - **isEligible** (boolean) - True if the player is eligible for the NPEv2 tutorial. - **failureReason** (string) - A string explaining why the player is not eligible, if applicable. #### Response Example ```json { "isEligible": true, "failureReason": null } ``` #### Error Response (Not explicitly defined in the provided text, but would likely return `isEligible: false` with a `failureReason`) ### Patch Changes * 9.0.1: Added. ``` -------------------------------- ### Example Usage of GetAutoCompleteResults Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-getautocompleteresults.md This example demonstrates how to use GetAutoCompleteResults to find player names starting with 'a' when sending mail. It utilizes predefined variables for autocomplete parameters and cursor position. ```Lua GetAutoCompleteResults("a", SendMailNameEditBox.autoCompleteParams.include, SendMailNameEditBox.autoCompleteParams.exclude, AUTOCOMPLETE_MAX_BUTTONS+1, SendMailNameEditBox:GetCursorPosition()) ``` -------------------------------- ### Get Softlock Weight Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-commentatorgetsoftlockweight.md Retrieves the softlock weight. This function is available starting from Patch 6.2.0. ```Lua {{wowapi}} Needs summary. weight = C_Commentator.GetSoftlockWeight() ==Returns== :;weight:{{apitype|number}} ==Patch changes== * {{Patch 6.2.0|note=Added.}} ``` -------------------------------- ### Start Challenge Mode Source: https://github.com/alejandrotrevi/warcraft-wiki-md/blob/main/api/api-c-challengemodestartchallengemode.md Initiates a challenge mode session. Returns true if successful. ```APIDOC ## C_ChallengeMode.StartChallengeMode ### Description Initiates a challenge mode session. Returns true if successful. ### Method POST ### Endpoint /api/challenge/start ### Parameters ### Request Body None ### Response #### Success Response (200) - **success** (boolean) - Indicates if the challenge mode was successfully started. #### Response Example ```json { "success": true } ``` ```