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

Difference between revisions of "User:Brammers/RaresDBapi"

From Neocron Wiki
Jump to: navigation, search
(Get rid of old qty - Not needed for now.)
m (Layout)
Line 4: Line 4:
  
 
== Methods ==
 
== Methods ==
 +
 +
=== Login ===
  
 
'''Login(username,user_api_key,client_api_key)'''
 
'''Login(username,user_api_key,client_api_key)'''
  
 
Returns a '''token_key''', which will be used for calls that need write access.
 
Returns a '''token_key''', which will be used for calls that need write access.
 +
 +
=== Logout ===
  
 
'''Logout(token_key)'''
 
'''Logout(token_key)'''
  
 
Logs out of the rares DB.
 
Logs out of the rares DB.
 +
 +
=== GetRaresList ===
  
 
'''GetRaresList()'''
 
'''GetRaresList()'''
Line 26: Line 32:
 
   </item>
 
   </item>
 
  </raredb>
 
  </raredb>
 +
 +
=== GetUserRaresList ===
  
 
'''GetUserRaresList(token_key,server_name)'''
 
'''GetUserRaresList(token_key,server_name)'''
 +
 +
=== SetPartQty ===
  
 
'''SetPartQty(token_key,server_name,part_id,new_qty)'''
 
'''SetPartQty(token_key,server_name,part_id,new_qty)'''
 +
 +
=== SetItemQty ===
  
 
'''SetItemQty(token_key,server_name,item_id,new_qty)'''
 
'''SetItemQty(token_key,server_name,item_id,new_qty)'''
 +
 +
=== IsListLocked ===
  
 
'''IsListLocked(token_key,server_name)'''
 
'''IsListLocked(token_key,server_name)'''

Revision as of 11:40, 13 April 2011

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

Login(username,user_api_key,client_api_key)

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

Logout

Logout(token_key)

Logs out of the rares DB.

GetRaresList

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

GetUserRaresList(token_key,server_name)

SetPartQty

SetPartQty(token_key,server_name,part_id,new_qty)

SetItemQty

SetItemQty(token_key,server_name,item_id,new_qty)

IsListLocked

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.