Difference between revisions of "XTS API"

From EUTC Wiki
Line 1: Line 1:
== XTS Application Programming Interface ==
+
= XTS Application Programming Interface =
  
 
Correct (though incomplete) as of 2008-07-18 (RC1 "Fat Cat")
 
Correct (though incomplete) as of 2008-07-18 (RC1 "Fat Cat")

Revision as of 17:03, 18 July 2008

XTS Application Programming Interface

Correct (though incomplete) as of 2008-07-18 (RC1 "Fat Cat")



General Errors

These errors can occur when calling any command, or when calling a command incorrectly. Errors are returned as an [[#<error>] document.

  • 401 notAuthorised You are not authorised to perform the action. You may need to supply a password, or it might simply be impossible to do what you want to do from the machine you're on.
  • 400.1 unrecognisedCommand The command is not recognised. Either you spelled it wrong, the API has changed since the documentation was written or you're simply doing it wrong.



Commands

getshows

Parameters

  • No parameters (yet)

Returns

A <shows> tag containing #<showsummary>s representing all shows in the database.

Errors

  • Never returns an error.

getshow

Parameters

  • showid The ID of the show to get.

Returns

A #<show> representing the show.

Errors

  • 404.3 showNotFound if the show doesn't exist in the database.



XML

<error>

Details an error that occured while processing your request.

Elements

  • @type The type number of the error, consists of a major and an (optional) minor part separated by a decimal point.
  • <message> A human-readable description of the error.

Example

 <error type="400.1">
   <message>Unrecognised command.</message>
 </error>

<showsummary>

Gives some summary details about a show in the database.

Elements

  • <id> The ID of the show.
  • <name> The name of the show.
  • <tagline> The show's tagline / strapline / subtitle.

Example

 <showsummary>
   <id>1</id>
   <name>Alice In Wonderland</name>
   <tagline>Texas Woman's University</tagline>
 </showsummary>

<show>

A <show> tag describes a single show in the database.

Elements

  • <id> The ID of the show.
  • <name> The name of the show.
  • <tagline> The show's tagline / strapline / subtitle.
  • <description> The show's description, if supplied. The usefulness of this field is debatable. I imagined it would carry publicity information that could be insta-formatted into web pages on the Bedlam Theatre website. Perhaps we should leave this tag as "reserved for future deprecation".

Example

 <show>
   <id>15</id>
   <name>Assassins</name>
   <tagline>Rather Like a Shark/DULOG</tagline>
   <description/>
 </show>