WoW:API QueryAuctionItems: Difference between revisions
Jump to navigation
Jump to search
(Note that getAll param doesn't actually do anything yet.) |
(getall is working now...) |
||
Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Will return information about items in the auction house. There must be a delay of about 3 second between queries. Use [[API CanSendAuctionQuery|CanSendAuctionQuery]]() to determine if a query can be done. | Will return information about items in the auction house. There must be a delay of about 0.3 second between regular queries and 15 minutes between getall queries. Use [[API CanSendAuctionQuery|CanSendAuctionQuery]]() to determine if a query can be done. | ||
QueryAuctionItems("name", | QueryAuctionItems("name", minLevel, maxLevel, | ||
invTypeIndex, classIndex, subclassIndex, | invTypeIndex, classIndex, subclassIndex, | ||
page, isUsable, qualityIndex, getAll | page, isUsable, qualityIndex, getAll | ||
Line 9: | Line 9: | ||
== Arguments == | == Arguments == | ||
:(string type, | :(string type, integer type, integer type, integer type, integer type, integer type, integer type, integer type, integer type, boolean type) | ||
:;name : A part of the item's name (or the complete name) or "" for no retrenchment. | :;name : A part of the item's name (or the complete name) or "" for no retrenchment. | ||
:;minLevel : Items below this level won't be returned. Either a number or | :;minLevel : Items below this level won't be returned. Either a number or nil for no restrictions. | ||
:;maxLevel : Items above this level won't be returned. Either a number or | :;maxLevel : Items above this level won't be returned. Either a number or nil for no restrictions. | ||
:;invtypeIndex : Character's slotposition in which the item can be placed in. Can be one of the following values | :;invtypeIndex : Character's slotposition in which the item can be placed in. Can be one of the following values | ||
:::; | :::;1 - Head slot (INVTYPE_HEAD) | ||
:::; | :::;2 - Neck slot (INVTYPE_NECK) | ||
:::; | :::;3 - Shoulder slot (INVTYPE_SHOULDER) | ||
:::;INVTYPE_BODY | :::;4 - Shirt slot (INVTYPE_BODY) | ||
:::; | :::;5 - Chest slot (INVTYPE_CHEST) | ||
:::; | :::;6 - Waist slot (INVTYPE_WAIST) | ||
:::; | :::;7 - Leg slot (INVTYPE_LEGS) | ||
:::; | :::;8 - Feet slot (INVTYPE_FEET) | ||
:::; | :::;9 - Wrist slot (INVTYPE_WRIST) | ||
:::; | :::;10 - Hand slot (INVTYPE_HAND) | ||
:::; | :::;11 - Finger slot (INVTYPE_FINGER) | ||
:::; | :::;12 - Trinket slot (INVTYPE_TRINKET) | ||
:::;INVTYPE_CLOAK | :::;13 - Back slot (INVTYPE_CLOAK) | ||
:::;INVTYPE_HOLDABLE | :::;14 - Weapon offhand slot (INVTYPE_HOLDABLE) | ||
:::; | :::;15 - Weapon mainhand slot (INVTYPE_WEAPONMAINHAND) | ||
:::; | :::;16 - Robe slot (INVTYPE_ROBE) | ||
:::; | :::;17 - Tabard slot (INVTYPE_TABARD) | ||
:::; | :::;18 - Container slot (INVTYPE_BAG) | ||
:::; | :::;19 - 2handed weapon (takes two slots) (INVTYPE_2HWEAPON) | ||
:::; | :::;20 - Ranged weapon slot (INVTYPE_RANGED) | ||
:::; | :::;21 - Shield slot (INVTYPE_SHIELD) | ||
:::; | :::;22 - Both weapon slots (INVTYPE_WEAPON) | ||
:::; | :::;0 - no restrictions | ||
:;classIndex : | :;classIndex : Returns only item in this class. Integer corresponds to the row number of the table returned by [[API GetAuctionItemClasses|GetAuctionItemClasses]]() or 0 for no restrictions. | ||
:;subclassIndex : | :;subclassIndex : Returns only items in this subclass. Integer corresponds to the row number of the table returned by [[API GetAuctionItemSubClasses|GetAuctionItemSubClasses]](index) or 0 for no restrictions. | ||
:;page : What page in the auctionhouse this shows up | :;page : What page in the auctionhouse this shows up. Note that pages start at 0. | ||
:;isUsable : Is useable by the player ( | :;isUsable : Is useable by the player (1 = true, 0 = no restrictions) | ||
:;qualityIndex : | :;qualityIndex : Can be one of the following values | ||
:;getAll : Download the ENTIRE auction house as one single page. Only allowed when [[API CanSendAuctionQuery|CanSendAuctionQuery]]() returns true as its second return (~every 15 minutes). May disconnect people with low bandwidth. Also see notes on client-to-server traffic in [[API GetAuctionItemInfo|GetAuctionItemInfo]]() (Added in 2.3 | :::;0 - No restriction | ||
:::;1 - Common Quality (white) or better | |||
:::;2 - Uncommon Quality (green) or better | |||
:::;3 - Rare Quality (blue) or better | |||
:::;4 - Epic Quality (purple) or better | |||
:;getAll : Download the ENTIRE auction house as one single page. Only allowed when [[API CanSendAuctionQuery|CanSendAuctionQuery]]() returns true as its second return (~every 15 minutes). May disconnect people with low bandwidth. Also see notes on client-to-server traffic in [[API GetAuctionItemInfo|GetAuctionItemInfo]]() (Added in 2.3, though initially disabled. Appears to be enabled as of 2.4) | |||
== Example == | == Example == | ||
QueryAuctionItems("",10, 19, | QueryAuctionItems("", 10, 19, 0, 2, 0, 0, 0, 3, 0) | ||
=== Result === | === Result === | ||
:Finds twink gear! (blue armor between lvl 10 and 19) | :Finds twink gear! (blue armor between lvl 10 and 19) | ||
: | : | ||
:also, the First page is page (0) zero | :also, the First page is page (0) zero | ||
== Notes == | == Notes == | ||
:;invTypeIndex does not appear to work for values past 14. | |||
:;If any of the entered arguments is of the wrong type, the search assumes a nil value. |
Revision as of 20:20, 8 August 2008
Will return information about items in the auction house. There must be a delay of about 0.3 second between regular queries and 15 minutes between getall queries. Use CanSendAuctionQuery() to determine if a query can be done.
QueryAuctionItems("name", minLevel, maxLevel, invTypeIndex, classIndex, subclassIndex, page, isUsable, qualityIndex, getAll )
Arguments
- (string type, integer type, integer type, integer type, integer type, integer type, integer type, integer type, integer type, boolean type)
- name
- A part of the item's name (or the complete name) or "" for no retrenchment.
- minLevel
- Items below this level won't be returned. Either a number or nil for no restrictions.
- maxLevel
- Items above this level won't be returned. Either a number or nil for no restrictions.
- invtypeIndex
- Character's slotposition in which the item can be placed in. Can be one of the following values
- 1 - Head slot (INVTYPE_HEAD)
- 2 - Neck slot (INVTYPE_NECK)
- 3 - Shoulder slot (INVTYPE_SHOULDER)
- 4 - Shirt slot (INVTYPE_BODY)
- 5 - Chest slot (INVTYPE_CHEST)
- 6 - Waist slot (INVTYPE_WAIST)
- 7 - Leg slot (INVTYPE_LEGS)
- 8 - Feet slot (INVTYPE_FEET)
- 9 - Wrist slot (INVTYPE_WRIST)
- 10 - Hand slot (INVTYPE_HAND)
- 11 - Finger slot (INVTYPE_FINGER)
- 12 - Trinket slot (INVTYPE_TRINKET)
- 13 - Back slot (INVTYPE_CLOAK)
- 14 - Weapon offhand slot (INVTYPE_HOLDABLE)
- 15 - Weapon mainhand slot (INVTYPE_WEAPONMAINHAND)
- 16 - Robe slot (INVTYPE_ROBE)
- 17 - Tabard slot (INVTYPE_TABARD)
- 18 - Container slot (INVTYPE_BAG)
- 19 - 2handed weapon (takes two slots) (INVTYPE_2HWEAPON)
- 20 - Ranged weapon slot (INVTYPE_RANGED)
- 21 - Shield slot (INVTYPE_SHIELD)
- 22 - Both weapon slots (INVTYPE_WEAPON)
- 0 - no restrictions
- classIndex
- Returns only item in this class. Integer corresponds to the row number of the table returned by GetAuctionItemClasses() or 0 for no restrictions.
- subclassIndex
- Returns only items in this subclass. Integer corresponds to the row number of the table returned by GetAuctionItemSubClasses(index) or 0 for no restrictions.
- page
- What page in the auctionhouse this shows up. Note that pages start at 0.
- isUsable
- Is useable by the player (1 = true, 0 = no restrictions)
- qualityIndex
- Can be one of the following values
- 0 - No restriction
- 1 - Common Quality (white) or better
- 2 - Uncommon Quality (green) or better
- 3 - Rare Quality (blue) or better
- 4 - Epic Quality (purple) or better
- getAll
- Download the ENTIRE auction house as one single page. Only allowed when CanSendAuctionQuery() returns true as its second return (~every 15 minutes). May disconnect people with low bandwidth. Also see notes on client-to-server traffic in GetAuctionItemInfo() (Added in 2.3, though initially disabled. Appears to be enabled as of 2.4)
Example
QueryAuctionItems("", 10, 19, 0, 2, 0, 0, 0, 3, 0)
Result
- Finds twink gear! (blue armor between lvl 10 and 19)
- also, the First page is page (0) zero
Notes
- invTypeIndex does not appear to work for values past 14.
- If any of the entered arguments is of the wrong type, the search assumes a nil value.