Difference between revisions of "Talk:WebAPI/Feedback"
(→Unexpected EOT character in Chinese (zh-tw) custom item name) |
(→Date/Time of when the item was acquired? Also, ResolveVanityURL: new section) |
||
Line 80: | Line 80: | ||
: Hmm, I've known about this error for some time now but it looks like I misjudged where it actually was, and thought that it was fixed in optf2 for quite a long time, as did Athernar. This also happens with some english names that have certain non-ASCII characters in them if I recall correctly. So stuff that does strict encoding will fail on it. Well, at least now that '''FAILED''' for optf2 can be turned into '''SUCCESS'''. Thanks for providing me a real reproduction. -- [[User:Lagg|Lagg]] [[File:Backpack_Stickybomb_Launcher.png|24px|link=User_talk:Lagg]] 15:48, 27 May 2012 (PDT) | : Hmm, I've known about this error for some time now but it looks like I misjudged where it actually was, and thought that it was fixed in optf2 for quite a long time, as did Athernar. This also happens with some english names that have certain non-ASCII characters in them if I recall correctly. So stuff that does strict encoding will fail on it. Well, at least now that '''FAILED''' for optf2 can be turned into '''SUCCESS'''. Thanks for providing me a real reproduction. -- [[User:Lagg|Lagg]] [[File:Backpack_Stickybomb_Launcher.png|24px|link=User_talk:Lagg]] 15:48, 27 May 2012 (PDT) | ||
+ | |||
+ | == Date/Time of when the item was acquired? Also, ResolveVanityURL == | ||
+ | |||
+ | Heres a suggestion: On each item in GetPlayerItems, it could also return the timestamp of when that item was found/bought/traded/otherwise appeared in the users' inventory. | ||
+ | |||
+ | This would allow people to check when an item was found and also could be used to make visual graphs about a users' item drops. | ||
+ | |||
+ | Also, I don't see the point behind ResolveVanityURL. Why have it as a separate method? It just means that I have to query the API twice whenever I have a vanity URL, which slows things down quite significantly (when you're from Australia with ~250ms ping to api.steampowered.com, this makes a difference.) Why not just have a separate field in most things, so you either have to supply the SteamID or the vanity URL? | ||
+ | If thats not possible, you could also adjust ResolveVanityURL to take a list of vanity strings -- something like GetPlayerSummaries but with a list of vanity URLs instead. | ||
+ | |||
+ | my two cents [[User:Pigophone|Pigophone]] 03:04, 27 April 2013 (PDT) |
Revision as of 10:04, 27 April 2013
Please use this page for reporting and discussing possible issues or inconsistencies with the API documentation or API itself. This is not for learning how to properly use one. |
Contents
- 1 Improperly formed JSON float_values for decal attributes - still not resolved
- 2 Painted items
- 3 custom texture lo - Invalid JSON
- 4 Item Origin
- 5 Unexpected EOT character in Chinese (zh-tw) custom item name
- 6 Unexpected SOH character in Russian custom item name
- 7 Date/Time of when the item was acquired? Also, ResolveVanityURL
Improperly formed JSON float_values for decal attributes - still not resolved
http://wiki.teamfortress.com/wiki/Talk:WebAPI/Feedback/Archive_3 has the previous thread. I'm still receiving the improperly formed JSON :( Just FYI - thanks! VMDX 14:37, 21 November 2011 (PST)
- Alright I've been on the lookout for this regression on my own logs for optf2 and asking around. I cannot find any reproductions. Care to give an id64 that exhibits this problem? -- Lagg 22:05, 30 November 2011 (PST)
- ex: in 76561198005981351 : "attributes": [ { "defindex": 152, "value": 1879034420, "float_value": 158326252166124510000000000000. }, { "defindex": 227, "value": 117757579, "foat_value": 0.000000 } ]
- Some json decoders break because the number doesn't have the 0 after the dot. I don't see this happen in PHP but I've heard others having this problem Ruiner 21:02, 22 April 2012 (PDT)
Painted items
I noticed that the steam community inventory viewer has images with paints embedded in them. Would it be possible for the backpack items to include the encoded URL for the image with paint. ex: with paint -- Ruiner 07:13, 25 February 2012 (PST)
custom texture lo - Invalid JSON
I had another talk with Drunken. This is the relevant part of his response on the matter. I'll be giving a language-independent workaround in a while if time permits.
1:34 PM - Drunken F00l: I know why it's printing bad values, yes 1:34 PM - Drunken F00l: it's just truncating 1:35 PM - Drunken F00l: I'll get it fixed but the fix probably won't ship until next week
-- Lagg 16:10, 23 April 2012 (PDT)
- Here is a temporary workaround for the problem, as promised. This call is for python's re module but should be similarly easy to modify as needed for basically any regex implementation out there. What the expression is doing is searching for a line with 0 or more characters of whitespace at the beginning, followed by the normal float_value key and then an arbitrary length integer followed by a decimal point and non-decimal character. The part of the string preceding the decimal point is captured and reinserted into a string suffixed with '.0'. I hope you find it useful.
re.sub('(\s*"float_value": -?\d+)\.[^\d]', '\\1.0', obj)
-- Lagg 21:08, 23 April 2012 (PDT)
- Fixed a small bit of the regexp. I'll let my commit message describe what the change was since it does it best: Because apparently I thought that the bug was choosy about what side of a 0 it appears on. -- Lagg 08:48, 24 April 2012 (PDT)
Item Origin
Item origin is buggy and/or incorrect. For example, many Bill's Hats are showing as timed drop. This was a promotional item and should be marked as such. There is also an origin flag "traded", but it's not clear when that attribute is used: Traded items usually do not acquire the origin to be set as "traded". For example, store purchased keys will keep their store purchased after being traded. My suggestion would be to make the item origin cumulative. If an item was purchased, then traded, it should be possible to tell what the original origin was, as well as the current origin. This way, we can tell in a user's inventory if the item has ever been traded, or if he is the original owner.
-- Ruiner 18:48, 24 April 2012 (PDT)
Unexpected EOT character in Chinese (zh-tw) custom item name
Backpack in question: 76561198038762828
TF2B: http://tf2b.com/tf2/76561198038762828 FAILED
OPTF2: http://optf2.com/tf2/user/76561198038762828 FAILED SUCCESS (Thanks)
TF2Items: http://www.tf2items.com/profiles/76561198038762828 SUCCESS
ValueError: Invalid control character at: line 766 column 44 (char 12881)
I hope this is the last error I find.
base1024 04:51, 27 May 2012 (PDT)
Unexpected SOH character in Russian custom item name
Backpack in question: 76561198045241951
TF2B: http://tf2b.com/tf2/76561198045241951 FAILED
OPTF2: http://optf2.com/tf2/user/76561198045241951 FAILED SUCCESS (Thanks)
TF2Items: http://www.tf2items.com/profiles/76561198045241951 SUCCESS
ValueError: Invalid control character at: line 2233 column 37 (char 39047)
base1024 05:12, 27 May 2012 (PDT)
- Hmm, I've known about this error for some time now but it looks like I misjudged where it actually was, and thought that it was fixed in optf2 for quite a long time, as did Athernar. This also happens with some english names that have certain non-ASCII characters in them if I recall correctly. So stuff that does strict encoding will fail on it. Well, at least now that FAILED for optf2 can be turned into SUCCESS. Thanks for providing me a real reproduction. -- Lagg 15:48, 27 May 2012 (PDT)
Date/Time of when the item was acquired? Also, ResolveVanityURL
Heres a suggestion: On each item in GetPlayerItems, it could also return the timestamp of when that item was found/bought/traded/otherwise appeared in the users' inventory.
This would allow people to check when an item was found and also could be used to make visual graphs about a users' item drops.
Also, I don't see the point behind ResolveVanityURL. Why have it as a separate method? It just means that I have to query the API twice whenever I have a vanity URL, which slows things down quite significantly (when you're from Australia with ~250ms ping to api.steampowered.com, this makes a difference.) Why not just have a separate field in most things, so you either have to supply the SteamID or the vanity URL? If thats not possible, you could also adjust ResolveVanityURL to take a list of vanity strings -- something like GetPlayerSummaries but with a list of vanity URLs instead.
my two cents Pigophone 03:04, 27 April 2013 (PDT)