Skip to content

API Specification

jnharton edited this page Feb 26, 2013 · 1 revision

MUDServer API Specification

Concept:

  • use for providing status data to a website etc
  • use a second server

version 1

Notes: Read-Only Access

Features to Implement:

  • database dump/reads
  • data equivalent of who, where commands
  • stats:

db objects

  • number of rooms
  • number of players
  • number of exits

interactable objects

  • number of items
  • number of things

Requests

Request structure (plain text over TCP):

request-data <api key> <who/where> request-stats <api key> <items/things>

Response Structure (plain text over TCP):

response-data <for: api key> <structure info> <structured data>

Structure Info {field1,field2,field3,...}

Structured Data

  • P(...) Player
  • I(...) Item
  • T(...) Thing

Example Request

api key: 8fd6ej7

Request (who)

request-data 8fd6ej7 who

Response (who data)

response-data for:8fd6ej7 {name,class,level} [P(Nathan,Sorcerer,7), P(Erin,Fighter,4)]
  • returns a basic List/Array of data

Procedure

  1. Client> Request -> APIServer
  2. APIServer> Recieve Request from Client
  3. APIServer> Process Request
  4. APIServer> Response -> Client
Clone this wiki locally