Difference between revisions of "User:Ath/WebAPI Examples"

From Team Fortress Wiki
Jump to: navigation, search
(Little more progress, basic outline/template done. Removed all code.)
m (Minor changes as per suggestions)
Line 1: Line 1:
This page is intended as a quick reference for working with the [[WebAPI]]. As such, it is intended to provide basic examples of how to make use of certain fields, not act as a tutorial.
+
This page is intended as a quick reference for working with the [[WebAPI]]. As such, it is intended to provide a basic explanation of how to understand and work with certain fields, not act as a tutorial.
  
 
==[[WebAPI/GetPlayerItems|GetPlayerItems]]==
 
==[[WebAPI/GetPlayerItems|GetPlayerItems]]==
Line 7: Line 7:
  
 
===contained_item===
 
===contained_item===
Contains a sub-array with the id, defindex and quality of an giftwrapped item.
+
Contains a sub-array with the id, defindex and quality of a giftwrapped item.
  
 
===attributes===
 
===attributes===
An array of arrays containing an attribute definition index and values. See the [[List_of_Item_Attributes|list]] for a complete overview of all attributes.
+
Has a variable number of sub-arrays containing an attribute definition index and values. See the [[List_of_Item_Attributes|list]] for a complete overview of all attributes.
  
 
==[[WebAPI/GetSchema|GetSchema]]==
 
==[[WebAPI/GetSchema|GetSchema]]==
  
 
===proper_name===
 
===proper_name===
Indicates the presence of a language-specific prefix such as "The" when the [[quality]] is Unique; ignored on non-Unique qualities.
+
If true, indicates the presence of a language-specific prefix such as "The" when an item's [[quality]] is Unique; ignored on non-Unique qualities.
  
 
[[Category:WebAPI|Examples]]
 
[[Category:WebAPI|Examples]]

Revision as of 23:16, 13 February 2011

This page is intended as a quick reference for working with the WebAPI. As such, it is intended to provide a basic explanation of how to understand and work with certain fields, not act as a tutorial.

GetPlayerItems

inventory

Contains a binary token encoded in denary form. The first 16 least significant bits denote an item's position within the backpack, the following 16 bits indicate which classes an item is currently equipped to. The first two most significant bits are currently unused.

contained_item

Contains a sub-array with the id, defindex and quality of a giftwrapped item.

attributes

Has a variable number of sub-arrays containing an attribute definition index and values. See the list for a complete overview of all attributes.

GetSchema

proper_name

If true, indicates the presence of a language-specific prefix such as "The" when an item's quality is Unique; ignored on non-Unique qualities.