-
Notifications
You must be signed in to change notification settings - Fork 31
APIItem
Karol Herbst edited this page May 13, 2014
·
6 revisions
This is used to get info about an item
URL
* http://api.desura.com/1/item
Post
* sitearea: Required, must be a valid [wiki:GeneralSitearea sitearea] (supported: games, mods, engines, groups, members) * siteareaid: Required, numeric * branch: Recommended, If not provided the latest build from each branch is returned * build: Not Required, Build to use for download size and install size
1. When wanting to install a new item the item api is called * Invalid data will result in a 107 (validation error) being thrown. * If the item can not be found it will result in a 110 (item not found) being thrown. * If the branch or build is provided and no file is found, a 100 (generic error) will be thrown. * Any other errors will result in a 100 (generic error) message being thrown. 1. If a valid sitearea / siteareaid is provided, 0 (ok) will be returned along with the item information.
Please note, that only mods and games published can be queried. Also the <developer></developer> can be of type "groups" or type "members".
100: Ok (games)
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="0"/>
<games>
<game siteareaid="1">
<name>Half-Life</name>
<nameid>half-life</nameid>
<summary>Summary goes here</summary>
<eula>http://www.desura.com/games/half-life/eula</eula>
<url>http://www.desura.com/games/half-life</url>
<urledit>http://www.desura.com/games/edit/half-life</urledit>
<urlpublish>http://www.desura.com/games/publish/half-life</urlpublish>
<homepage>http://www.valvesoftware.com/</homepage>
<style>First Person Shooter</style>
<theme>Fighter</theme>
<type>Single & Multiplayer</type>
<indie>Commercial</indie>
<rating>0</rating>
<icon>http://media.gamedev.com/images/2/1/1/109/icon1.gif</icon>
<boxart>http://media.gamedev.com/images/2/1/1/109/logo1.gif</boxart>
<branches />
<cdkey />
<dlc>0</dlc>
<settings>
<executes>
<execute>
<name>Play</name>
<exe>%HALFLIFE_EXE%</exe>
<args>args</args>
</execute>
<execute>
<name>3</name>
<exe>%STEAMEXE%</exe>
<args>2</args>
</execute>
</executes>
<installlocations>
<installlocation>
<check>%STEAMAPPS%/half-life 2 content.gcf</check>
<path>%STEAMAPPS%</path>
</installlocation>
<installlocation>
<check>%INSTALL_PATH%</check>
<path>%INSTALL_PATH%</path>
</installlocation>
</installlocations>
</settings>
<uploadable>0</uploadable>
<developer sitearea="members" siteareaid="1346">
<name>pizza</name>
<nameid>pizza</nameid>
<url>http://www.gamedev.com/members/pizza</url>
</developer>
<publisher sitearea="members" siteareaid="1346">
<name>pizza</name>
<nameid>pizza</nameid>
<url>http://www.gamedev.com/members/pizza</url>
</publisher>
<engine siteareaid="1">
<name>Custom Built</name>
<nameid>custom-built</nameid>
<url>http://www.gamedev.com/engines/custom-built</url>
</engine>
<mods></mods>
</game>
</games>
<wcards>
<wcard name="SOURCE_SDK" type="exe">%STEAMAPPS%/%STEAMUSER%/source sdk base/hl2.exe</wcard>
<wcard name="SOURCEMODS" type="path">%STEAMAPPS%/sourcemods</wcard>
<wcard name="STEAMAPPS" type="path">%STEAM%/steamapps</wcard>
<wcard name="STEAM" type="regkey">HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath</wcard>
<wcard name="STEAMUSER" type="special">%STEAMUSER%</wcard>
</wcards>
</iteminfo>
100: Ok (mods)
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="0"/>
<toolinfo>
<tools>
<tool siteareaid="1234">
<name>DirectX 9.0c Runtime</name>
<nameid>directx-9.0c</nameid>
<args>/silent</args>
<url>http://tools.desura.com/123/directx_9.0_runtime.exe</url>
<size>45006589</size>
<hash>3fa7292c32eb201b6fe15894fdc2268f</hash>
<intallchecks> <!-- can be multiple -->
<installcheck>%DX90RUNTIME%</installcheck>
</intallchecks>
<result>0</result> <!-- optional. Only if needed (dont include if not set/needed) -->
</tool>
</tools>
<wcards>
<wcard name="DX90RUNTIME" type="msicheck">{071c9b48-7c32-4621-a0ac-3f809523288f}</wcard>
</wcards>
</toolinfo>
<games>
<game siteareaid="1">
<name>Half-Life</name>
<nameid>half-life</nameid>
<summary>Summary goes here</summary>
<eula>http://www.desura.com/games/half-life/eula</eula>
<url>http://www.gamedev.com/games/half-life</url>
<urledit>http://www.gamedev.com/games/edit/half-life</urledit>
<urlpublish>http://www.gamedev.com/games/publish/half-life</urlpublish>
<homepage>http://www.valvesoftware.com/</homepage>
<style>First Person Shooter</style>
<theme>Fighter</theme>
<type>Single & Multiplayer</type>
<indie>Commercial</indie>
<rating>0</rating>
<icon>http://media.gamedev.com/images/2/1/1/109/logo1.gif</icon>
<boxart>http://media.gamedev.com/images/2/1/1/109/icon1.gif</boxart>
<branches />
<dlc>0</dlc>
<settings>
<executes>
<execute>
<name>Play</name>
<exe>%HALFLIFE_EXE%</exe>
<args>args</args>
</execute>
<execute>
<name>3</name>
<exe>%STEAMEXE%</exe>
<args>2</args>
</execute>
</executes>
<installlocations>
<installlocation>
<check>%STEAMAPPS%/half-life 2 content.gcf</check>
<path>%STEAMAPPS%</path>
</installlocation>
<installlocation>
<check>%INSTALL_PATH%</check>
<path>%INSTALL_PATH%</path>
</installlocation>
</installlocations>
</settings>
<uploadable>0</uploadable>
<developer sitearea="members" siteareaid="1346">
<name>pizza</name>
<nameid>pizza</nameid>
<url>http://www.gamedev.com/members/pizza</url>
</developer>
<publisher sitearea="members" siteareaid="1346">
<name>pizza</name>
<nameid>pizza</nameid>
<url>http://www.gamedev.com/members/pizza</url>
</publisher>
<engine siteareaid="1">
<name>Custom Built</name>
<nameid>custom-built</nameid>
<url>http://www.gamedev.com/engines/custom-built</url>
</engine>
<mods>
<mod siteareaid="3">
<name>Sample Mod</name>
<nameid>sample-mod</nameid>
<summary>Summary goes here</summary>
<eula>http://www.desura.com/mods/sample-mod/eula</eula>
<url>http://www.gamedev.com/mods/sample-mod</url>
<urledit>http://www.gamedev.com/mods/edit/sample-mod</urledit>
<urlpublish>http://www.gamedev.com/mods/publish/sample-mod</urlpublish>
<homepage>http://sample.moddb.com</homepage>
<style>First Person Shooter</style>
<theme>Western</theme>
<type>Single Player</type>
<indie>Indie</indie>
<rating>6</rating>
<icon>http://media.gamedev.com/images/3/1/1/3/icon.gif</icon>
<branches>
<branch id="17">
<name>Default</name>
<nameon>0</nameon>
<free>1</free>
<price></price>
<demo>0</demo>
<test>0</test>
<eula date="1286283967">http://www.gamedev.com/mods/sven-co-op/eula/37</eula>
<inviteonly>0</inviteonly>
<regionlock>0</regionlock>
<preload>20120716062301</preload>
<onaccount>0</onaccount>
<mcf id="84">
<build>3</build>
<version>4.07</version>
<filesize>410143799</filesize>
<installsize>820241115</installsize>
</mcf>
<tools>
<tool>1234</tool>
</tools>
<installscript crc="23456234">AQDFSTEST==</installscript> <!-- install script is base 64 encoded -->
</branch>
</branches>
<dlc>0</dlc>
<settings>
<executes>
<execute>
<name>Play</name>
<exe>%HALFLIFE_EXE%</exe>
<args>args</args>
</execute>
<execute>
<name>3</name>
<exe>%STEAMEXE%</exe>
<args>2</args>
</execute>
</executes>
<installcomplex>1</installcomplex>
<installprimary>%INSTALL_PATH%\sven</installprimary>
<installlocations>
<installlocation>
<check>%MOD_INSTALL_PATH%/gameinfo.txt</check>
<path>%MOD_INSTALL_PATH%</path>
</installlocation>
<installlocation>
<check>%INSTALL_PATH%</check>
<path>%INSTALL_PATH%</path>
</installlocation>
</installlocations>
</settings>
<uploadable>1</uploadable>
<developer sitearea="groups" siteareaid="2">
<name>DesuraNET</name>
<nameid>desuranet1</nameid>
<url>http://www.gamedev.com/groups/desuranet1</url>
</developer>
</mod>
</mods>
</game>
</games>
<wcards>
<wcard name="MOD_INSTALL_PATH" type="path">%SOURCEMODS%/samplemod</wcard>
<wcard name="SOURCE_SDK" type="exe">%STEAMAPPS%/%STEAMUSER%/source sdk base/hl2.exe</wcard>
<wcard name="SOURCEMODS" type="path">%STEAMAPPS%/sourcemods</wcard>
<wcard name="STEAMAPPS" type="path">%STEAM%/steamapps</wcard>
<wcard name="STEAM" type="regkey">HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath</wcard>
<wcard name="STEAMUSER" type="special">%STEAMUSER%</wcard>
</wcards>
</iteminfo>
100: Ok (engines)
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="0"/>
<engines>
<engine siteareaid="1">
<name>Custom Built</name>
<nameid>custom-built</nameid>
<summary></summary>
<url>http://www.gamedev.com/engines/custom-built</url>
<urledit>http://www.gamedev.com/engines/edit/custom-built</urledit>
<homepage></homepage>
<permissions>
<edit>1</edit>
</permissions>
<licence>Commercial</licence>
<released>1</released>
<developer sitearea="groups" siteareaid="3">
<name>DesuraNET</name>
<nameid>desuranet</nameid>
<url>http://www.gamedev.com/groups/desuranet</url>
</developer>
</engine>
</engines>
</iteminfo>
100: Ok (members)
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="0"/>
<members>
<member siteareaid="1">
<name>INtense!</name>
<nameid>intense</nameid>
<summary></summary>
<url>http://www.gamedev.com/members/intense</url>
<urledit>http://www.gamedev.com/members/edit/intense</urledit>
<homepage>http://www.moddb.com/</homepage>
<permissions>
<edit>1</edit>
</permissions>
<email>scott@moddb.com</email>
<firstname>Scott </firstname>
<lastname> Reismanis </lastname>
<timezone>UTC</timezone>
<language>en</language>
<avatar>http://media.gamedev.com/images/members/1/1/rara.jpg</avatar>
<online>1</online>
<country>AU</country>
<age>1983-07-18</age>
<gender>Male</gender>
<datelastvisit>20081111194827</datelastvisit>
</member>
</members>
</iteminfo>
100: Ok (groups)
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="0"/>
<groups>
<group siteareaid="1">
<name>N/A</name>
<nameid>na</nameid>
<summary></summary>
<url>http://www.gamedev.com/groups/na</url>
<urledit>http://www.gamedev.com/groups/edit/na</urledit>
<homepage>http://www.desuranet.com</homepage>
<permissions>
<edit>1</edit>
</permissions>
<email>host@desura.com</email>
<type>Official</type>
<subscription>Invitation only</subscription>
<privacy>Public</privacy>
<company>0</company>
<members>5</members>
</group>
</groups>
</iteminfo>
107: Validation Error
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="107">
The sitearea field is required.
The siteareaid field is required.
</status>
<validation>
<fields>
<sitearea>The sitearea field is required.</sitearea>
<siteareaid>The siteareaid field is required.</siteareaid>
</fields>
</validation>
</iteminfo>
110: Item Not Found
<?xml version="1.0" encoding="utf-8"?>
<iteminfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="desura" version="1">
<status code="110">The members id (134534534534435) could not be found.</status>
</iteminfo>
100: Generic Error
As above, only with different status code and text.