Latest Neocron News and Information

  • New test server patch #550 has been released to Vedeena
  • New retail server patch #551 has been released to Titan

User:Brammers/RaresDBapi

From Neocron Wiki
< User:Brammers
Revision as of 15:28, 7 April 2011 by Brammers (talk | contribs) (Get rid of old qty - Not needed for now.)
Jump to: navigation, search

Rares DB API

See http://forum.neocron.com/showthread.php?t=144684 This is a design document to provide API access to the Rares DB via a SOAP interface.

Methods

Login(username,user_api_key,client_api_key)

Returns a token_key, which will be used for calls that need write access.

Logout(token_key)

Logs out of the rares DB.

GetRaresList()

This returns an XML document with the Item ID's to Part ID's mapping, and the type of parts like on http://rares.techhaven.org/list.php

<raredb>
 <item id="1" name="Terminator">
  <part id="7" type="TP"/>
  <part id="8" type="HP"/>
  <part id="9" type="FP"/>
  <part id="10" type="CP"/>
  <part id="11" type="OP"/>
 </item>
</raredb>

GetUserRaresList(token_key,server_name)

SetPartQty(token_key,server_name,part_id,new_qty)

SetItemQty(token_key,server_name,item_id,new_qty)

IsListLocked(token_key,server_name)

Parameters

username - THN Username.

user_api_key - An API key - this will be issued to users of the rares DB via the Rares DB interface. The API key is to prevent issues with third party apps storing username and passwords.

client_api_key - An API key for the client. This is issued by the THN, and should not be made public by any developers. This allows the THN to revoke access to any clients that may be mis-using the API, and also it allows developers to invalidate older versions of their clients for reasons of bugs etc.

token_key - This is a token that is issued when the Login method is called successfully and is used for all calls to the API that require an update.