Difference between revisions of "User:STUART/WebAPI"

From Team Fortress Wiki
Jump to: navigation, search
Line 1: Line 1:
 
==Things that should be fixed in the Steam Web API system==
 
==Things that should be fixed in the Steam Web API system==
*JSON and VDF should use arrays rather than objects containing arrays. Having them structured differently from XML complicates code unnecessarily (and result.items.item[1] looks stupid compared to results.items[1]).
+
*JSON and VDF should use arrays rather than objects containing arrays. Having them structured differently from XML complicates code unnecessarily (and result.items.item[1] looks stupid compared to results.items[1]). Nobody in JSON cares about the class name, and anybody using VDF is writing code that was written for the original data file, which was structured this way originally.
 
==Methods that should be added to ITFItems_440==
 
==Methods that should be added to ITFItems_440==
*A method that returns what GetSchema does for scripts/items/items_game.txt, for resources/tf_english.txt. The former's not very useful without the latter.
+
*A method that, for resources/tf_english.txt, returns what GetSchema does for scripts/items/items_game.txt. The latter's not very useful without the former as far as output is concerned.
 
*A method that returns the latest revision information for each of these, so systems know when they need to make the heavy call to GetSchema (and the hypothetical method that returns language data).
 
*A method that returns the latest revision information for each of these, so systems know when they need to make the heavy call to GetSchema (and the hypothetical method that returns language data).
 
==Things that should be added to the next version of GetSchema==
 
==Things that should be added to the next version of GetSchema==
 
*The revision number, so systems can compare it (for stored data) against the latest revision (as described above).
 
*The revision number, so systems can compare it (for stored data) against the latest revision (as described above).
 
*The defindex of attributes for items, rather than the attribute's name and class. If GetPlayerInventory uses defindex for its attributes, GetSchema should too.
 
*The defindex of attributes for items, rather than the attribute's name and class. If GetPlayerInventory uses defindex for its attributes, GetSchema should too.

Revision as of 13:42, 3 July 2010

Things that should be fixed in the Steam Web API system

  • JSON and VDF should use arrays rather than objects containing arrays. Having them structured differently from XML complicates code unnecessarily (and result.items.item[1] looks stupid compared to results.items[1]). Nobody in JSON cares about the class name, and anybody using VDF is writing code that was written for the original data file, which was structured this way originally.

Methods that should be added to ITFItems_440

  • A method that, for resources/tf_english.txt, returns what GetSchema does for scripts/items/items_game.txt. The latter's not very useful without the former as far as output is concerned.
  • A method that returns the latest revision information for each of these, so systems know when they need to make the heavy call to GetSchema (and the hypothetical method that returns language data).

Things that should be added to the next version of GetSchema

  • The revision number, so systems can compare it (for stored data) against the latest revision (as described above).
  • The defindex of attributes for items, rather than the attribute's name and class. If GetPlayerInventory uses defindex for its attributes, GetSchema should too.