Difference between revisions of "WebAPI"
(i-ghost missed one! Also might as well start this now) |
(There, now all Joerelics are gone. Removing VDC links since there is no more information to be found there. VDF will get a simple language agnostic doc) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
== Common elements == | == Common elements == | ||
Line 9: | Line 5: | ||
All TF2 methods take the following arguments in their URL: | All TF2 methods take the following arguments in their URL: | ||
− | ;key: Your Steam Web API key. Without this, the server will return an HTTP 403 (forbidden) error. | + | ;key: Your Steam Web API key. Without this, the server will return an HTTP 403 (forbidden) error. A key can be generated [http://www.steamcommunity.com/dev/apikey here]. |
− | ;{{API optional|format}}: The format to return | + | ;{{API optional|format}}: The file format to return output in. |
+ | :;<code>json</code> (default): The [http://json.org JavaScript Object Notation] format | ||
+ | :;<code>xml</code>: Standard XML | ||
+ | :;<code>vdf</code>: [[/VDF|Valve Data Format]] | ||
=== Terminology === | === Terminology === | ||
Line 51: | Line 50: | ||
* [[Talk:WebAPI/Feedback|Feedback]] for requests, suggestions, and issues. | * [[Talk:WebAPI/Feedback|Feedback]] for requests, suggestions, and issues. | ||
− | |||
[[Category:Valve]] | [[Category:Valve]] | ||
[[Category:WebAPI| ]] | [[Category:WebAPI| ]] |
Revision as of 16:31, 12 December 2011
Contents
Common elements
Parameters
All TF2 methods take the following arguments in their URL:
- key
- Your Steam Web API key. Without this, the server will return an HTTP 403 (forbidden) error. A key can be generated here.
- format (Optional)
- The file format to return output in.
json
(default)- The JavaScript Object Notation format
xml
- Standard XML
vdf
- Valve Data Format
Terminology
A "tokenized string" refers to a string containing "#
"-prefixed tokens that are replaced with the equivalent string in the game's VDF for the chosen language. For instance, "TF_Weapon_Jar
" is defined as "Jar Based Karate
" in tf/resource/tf_english.txt (as found in "team fortress 2 content.gcf").
Methods
- GetSchema
- Information about the items in a supporting game.
- GetPlayerItems
- Lists items in a player's backpack.
- GetAssetPrices
- Prices of items in the economy.
- GetAssetClassInfo
- Asset metadata
- ResolveVanityURL
- Resolve vanity URL parts to a 64 bit ID.
- GetNewsForApp
- News feed for various games
- GetGlobalAchievementPercentagesForApp
- Statistics showing how much of the player base have unlocked various achievements.
- GetPlayerSummaries
- User profile data
- GetFriendList
- User friend list
Notes
List of valid IDs
- 440
- Team Fortress 2
- 520
- Team Fortress 2 Public Beta
- 620
- Portal 2
Methods Requiring a 64-bit User ID
Most API requests that take an ID parameter require a 64 bit ID, if one is not readily available a vanity URL part can be resolved via ResolveVanityURL.
Implementations
- Steam Condenser Ruby, PHP, and Java library.
- TF2 Web APpy A small Python class.
- Steamodd Python module.
- OPTF2 online viewer (source code).
- libsc An Objective-C library for iOS (4.0+) and framework for Mac OS X (10.6+).
See also
- Feedback for requests, suggestions, and issues.