From The Mana World
m (TMWWEB Connector moved to TMWWeb Connector: Trying to standardize capitalization)
m (Some grammer, spelling, capitalization fixes)
Line 1: Line 1:
== What is a TMWWEB Connector? ==
== What is a TMWWeb Connector? ==


The TMWWEB Connector is a package of methods provided by TMWWEB to allow foreign applications to access data of the running tmwserv server. A common example is a list of online users that are currently connected to the server. TMWWEB is able to deliver the data in different formats to be as open as possible for all kinds of applications, e.g. plain text or xml.
The TMWWeb Connector is a package of methods provided by TMWWeb to allow foreign applications to access data of the running TMWServ server. A common example is a list of online users that are currently connected to the server. TMWWeb is able to deliver the data in different formats to be as open as possible for all kinds of applications, e.g. plain text or XML.


== FAQ ==
== FAQ ==
Line 7: Line 7:
=== How can I connect to the Connector? ===
=== How can I connect to the Connector? ===


Until today, ther is no public installation of the [[Account Manager]] respective the connector. If you set up an installation of your own, just navigate your browser to the mainpage of tmwweb and add a "index.php/connector/" to the URL. The URL might look like that:
There is no public installation of the [[Account Manager]] respective the connector. If you set up an installation of your own, just navigate your browser to the main page of TMWWeb and add a "index.php/connector/" to the URL. The URL might look like this: <code>http://localhost/tmwweb/index.php/connector/</code>.
  http://localhost/tmwweb/index.php/connector/


This is the root URL of the connector. Now you have to extend the URL with the name of the connector function you wan't to execute, e.g. ''onlineuser'' which will give you a URL like this:
This is the root URL of the connector. Now you have to extend the URL with the name of the connector function you want to execute, e.g. ''onlineuser'' which will give you this URL: <code>http://localhost/tmwweb/index.php/connector/onlineuser/</code>


  http://localhost/tmwweb/index.php/connector/onlineuser/
Some methods might need input parameters or support different output formats. All parameters have to be added with a "/" to the URL, like the method name.  
 
Some methods probaly need input parameters or support different output formats. All parameters have to be added with a "/" to the url similar as the method name.  




Line 22: Line 18:
=== List of online users (onlineuser) ===
=== List of online users (onlineuser) ===


This will give you a list of all users online and connected with a char to the tmwserv Server.
This will give you a list of all users online with a character in TMWServ.


==== Parameters ====
==== Parameters ====
# Output format:
# Output format:
#* "plain" (default) will return a plain textfile with a character name per line.
#* "plain" (default) will return a plain text file with one character name per line:
#* "xml" will return a xml file with more detailed informations about online characters.
#* "csv" will return a plain textfile with detailed informations about online characters, separated by a ","
 
'''Plain text example'''
 
   name
   name
   name2
   name2
 
  ...
'''XML example'''
#* "xml" will return an XML file with more detailed information about each online character:
 
   <users>
   <users>
       <user name="[string]"  
       <user name="[string]"  
Line 45: Line 35:
       <user ...>
       <user ...>
   </users>
   </users>
 
#* "csv" will return a comma-separated list of character information, one online character per line:
'''CSV example'''
 
   "name",gender,map,login_timestamp,"login_date"
   "name",gender,map,login_timestamp,"login_date"
  "name2",gender2,map2,login_timestamp2,"login_date2"
  ...


* ''name'': Name of the character
* ''name'': Name of the character
Line 58: Line 48:


==== Usage ====
==== Usage ====
  connector/onlineuser/[plain|xml|csv]
The output format of the onlineuser module is specified like so: <code>connector/onlineuser/[plain|xml|csv]</code>

Revision as of 13:57, 3 December 2008

What is a TMWWeb Connector?

The TMWWeb Connector is a package of methods provided by TMWWeb to allow foreign applications to access data of the running TMWServ server. A common example is a list of online users that are currently connected to the server. TMWWeb is able to deliver the data in different formats to be as open as possible for all kinds of applications, e.g. plain text or XML.

FAQ

How can I connect to the Connector?

There is no public installation of the Account Manager respective the connector. If you set up an installation of your own, just navigate your browser to the main page of TMWWeb and add a "index.php/connector/" to the URL. The URL might look like this: http://localhost/tmwweb/index.php/connector/.

This is the root URL of the connector. Now you have to extend the URL with the name of the connector function you want to execute, e.g. onlineuser which will give you this URL: http://localhost/tmwweb/index.php/connector/onlineuser/

Some methods might need input parameters or support different output formats. All parameters have to be added with a "/" to the URL, like the method name.


Method Specification

List of online users (onlineuser)

This will give you a list of all users online with a character in TMWServ.

Parameters

  1. Output format:
    • "plain" (default) will return a plain text file with one character name per line:
  name
  name2
  ...
    • "xml" will return an XML file with more detailed information about each online character:
  <users>
     <user name="[string]" 
           gender="[number]" 
           map="[number]" 
           login_timestamp="[number]"
           login_date="[string]" />
     <user ...>
  </users>
    • "csv" will return a comma-separated list of character information, one online character per line:
  "name",gender,map,login_timestamp,"login_date"
  "name2",gender2,map2,login_timestamp2,"login_date2"
  ...
  • name: Name of the character
  • gender: 0 = male, 1 = female
  • map: ID of the current location (see Configuration file:maps.xml)
  • login_timestamp: Unix time-stamp the character logged in
  • login_date: Time-stamp of login in ISO 8601 format (e.g. 2004-02-12T15:19:21+00:00)


Usage

The output format of the onlineuser module is specified like so: connector/onlineuser/[plain|xml|csv]