This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
'Not available to players' flag in item XML feed?
Post Reply
Return to board index
Post by
Kremonte
I was wondering if it were possible to get a flag in the XML feed of whether or not an item was available to players (or actually, any of the quick facts on an item.) I'm trying to
fully
populate item caches for multiple locales (everything Wowhead supports, actually...) for an item linking mod I've made, so I don't have to manually repopulate it every server restart. I know I still stand the risk of getting DCed from items that the server hasn't seen yet, but that's a heck of a lot better than getting disconnected on every third item (especially until ID 3000ish) because they are from beta, unused, deprecated or otherwise.
For example,
Martin Thunder
's XML would return as:
<wowhead>
<item id="192">
<name>Martin Thunder</name>
<level>75</level>
<facts>
<fact>Not available to players</fact>
(or) <availability gmonly="1" /> (or something like that)
and it could also be expanded to this or something...
<value sell="210533" buy="" /> (going out on a limb here...)
</facts>
</item>
</wowhead>
I could, of course, use the dirty method of taking the HTML of each item I'm querying, and check that for the not available flag, but that just seems like a waste of perfectly good bandwidth :(
Post by
Malgayne
We do have plans to expand the features we offer in XML, but it may be a little while before we get there.
Post by
Kremonte
We do have plans to expand the features we offer in XML, but it may be a little while before we get there.
Thanks for the hasty reply, and that's good to know.
In the mean time, would you have any suggestions as to how to go about this? Basically, what I'm trying to do is get a list of all valid item IDs, then I'll convert that to a lua table and query each one with GetItemInfo() in-game, to populate a cache. Right now, the only way I can think of doing that would be to query every single item ID (1-~40000) from a database like Wowhead, then check the HTML returned for both an error (meaning the item doesn't exist), and a flag to see if the item is/isn't available to players.
It seems like an awful lot of excess, wasted data - thus why I wanted to use XML for it. Still some wasted data, but not nearly the same amount, and more manageable too. I've got no idea of the levels of bandwidth Wowhead uses, but the whole idea really seems to me pretty rude, but I'm out of thoughts :(
Post by
Malgayne
Screen-scraping or spidering our site is actually against our terms of use, except where a specific arrangement exists. =/
I'm not really sure how to help you on this one. Have you considered looking at the Armory's XML, or possibly the XML on
Allakhazam
? They may have more data on their XML feed, i haven't looked recently.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.