Talk:WebAPI/Feedback

From Team Fortress Wiki
< Talk:WebAPI
Revision as of 21:52, 14 November 2011 by Ath (talk | contribs) (Paint(ed) item images.)
Jump to: navigation, search

Sample / test profile

It would be nice to have a dummy profile that we can use to test against. The profile would hopefully include items of all quality types, positions, placed and unplaced items, etc. Jasonla 15:21, 2 July 2011 (PDT)

as well as description/name tags, all possible attributes, kill-kounter ranks, paint colours, etc. I like the idea!Killicon machina penetratehs.png Cerbrus 23:32, 2 November 2011 (PDT)
I wouldn't count on this happening anytime soon. You're better off testing against Robin Walker's profiles and a couple of high-level traders. ~ Ath (talk) 09:49, 3 November 2011 (PDT)
Yeah, I figured it wouldn't happen. But that's my feedback, and I thought, "Why not throw it out there and hope something comes of it." jasonla 10:53, 3 November 2011 (PDT)
Robin's my prime test subject, right now... I'm just kinda confused where I should find custom descriptions / item names (name/description tagged items)! In the attributes, what defindex should I be looking for?Killicon machina penetratehs.png Cerbrus 12:48, 3 November 2011 (PDT)
There are no attributes for custom names or descriptions. Try looking at the documentation for GetPlayerItems. ~ Ath (talk) 12:53, 3 November 2011 (PDT)
Oh man, how could I have missed that -.- Killicon machina penetratehs.png Cerbrus 19:04, 3 November 2011 (PDT)

Hidden attributes

Why is it that the "makers mark id" (defindex 228) is a hidden attribute? It is being showed inside the game so I don't understand why it's not the same here. Durza007 09:43, 29 July 2011 (PDT)

Paint(ed) item images.

Would it be possible to have the api return image url's for painted items, and correctly coloured images for paintcans? Or maybe, since the colour addition happens in-game with some kind of overlay, last I read, would it be posible to get a url to that overlay, per item?

I'm currently getting my paintbucket images from this wiki, but they'll have to be added into my code, manually, because of the seemingly random part of the url ( /6/69/ <-- those numbers)Killicon machina penetratehs.png Cerbrus 23:30, 2 November 2011 (PDT)

Regarding the seemingly random part of the images, those are the first and first/second characters of an MD5 hash of the image name. So, if the hash for an image was 01e071d9f50663dc2fb391a0a43babf3, then the 'random' part of the url would be /0/01. i-ghost 11:25, 3 November 2011 (PDT)
Right, meaning that there's no consistent short way to go from a known item to its corresponding image. Some information unfortunately needs to be mapped by you (like you have done) and could be subject to change. The preceding unsigned comment was added by Fashnek (talk) • (contribs)
The hash shouldn't really change, after the file's submitted, but without the image's url, there's no way to get it's hash, right? So one depends on the other, and vice versa, eventually relying on you, addin either the images to your project, or some sort of table containing parts of the url's... Hence my request for painted image urls / paint template overlays (+instructions on what blend modes to use, etc?)Killicon machina penetratehs.png Cerbrus 12:40, 3 November 2011 (PDT)
This topic was already brought up once in the archives, and a Valve employee commented on the matter. Use the Wiki's images until such time as the feature can be implemented. Additionally, the hashes are a result of the automated icon-upload script that's used; you can safely disregard the hashes and just use image_inventory + an extension if you're storing files locally. ~ Ath (talk) 12:50, 3 November 2011 (PDT)
The problem is that I can't use the wiki's images, since there's no practical way of accessing them, without saving some kind of table containing the first two characters of each hash. These hashes can't be disregarded if I'd want to use the wiki as image source, but I can't calculate the hash without an image that I can't obtain without the hash.
The app I'm making shouldn't contain any preloaded images, not to mention megabytes of item/paint combination images one's probably never going to access. (It only displays item/paint combinations available, from the person's backpack. Aside from the fact that I see no practical way of obtaining all those images, storing the files locally isn't exactly the solution I'm looking for, either. Killicon machina penetratehs.png Cerbrus 12:18, 14 November 2011 (PST)
My point was to use the Wiki images in regard to you reuploading them to your own server, not hotlinking the Wiki as that would be very bad practice. Presumably, if you're writing a WebAPI-based app then you must have your own hosting of some form as not to violate the Terms of Use in regard to the API key. As such, you should be able to store a copy of the images, and have your app reference those. ~ Ath (talk) 13:52, 14 November 2011 (PST)

Improperly formed JSON float_values for decal attributes?

I've been receiving improperly formed JSON where float_values are missing digits after the decimal point (i.e. "float_value": -1752173725722172700000000000.). They seem to be happening on the "custom_texture_lo" attribute (defindex 152).

Example backpack IDs are 76561197996909228 and 76561198018924290 as of now.

How are others dealing with this problem?

VMDX 18:42, 8 November 2011 (PST)

Unfortunately something like this has happened in the past with float values (Valve seems to be pretty allergic to these for some reason). The big issue here is that isn't valid JSON and so will be spit out by all but the most lenient parsers. So in order to do anything with it you'll need to search the string in an ad-hoc manner and replace every occurrence of the invalid syntax or remove float_value lines entirely, the former is probably fairly easy to do with a regexp replace and also how I'll work around it myself. Problem is that backpacks tend to be pretty large and so you're going to be eating up precious cycles trying to search for it. I'll pass this along to someone at Valve. It's time to do a mass mail I think. -- Lagg Backpack Stickybomb Launcher.png 04:47, 9 November 2011 (PST)
I received an email from Valve about this. It is fixed and should propagate to affected backpacks shortly. -- Lagg Backpack Stickybomb Launcher.png 16:01, 10 November 2011 (PST)
Hooray! Thanks. P.S. Is this the preferred mode of notification on API issues? (post on WebAPI wiki, have liaison talk to Valve?) VMDX 18:51, 10 November 2011 (PST)
I'm the defacto proxy for stuff going to Valve these days regarding the API and such, and I monitor all talk pages. Some of the API maintainers at Valve probably have these pages in their watchlist but I try my best to bring issues to them myself so the documentation can get done efficiently and free up the talk pages for archiving. It also saves all parties the hassle of communicating among themselves as I try to stuff all the information I can about a possible issue into the mail and keep my reporting style relatively consistent. After evaluating the issue myself first of course. -- Lagg Backpack Stickybomb Launcher.png 04:43, 11 November 2011 (PST)