Difference between revisions of "Charlottetown Transit API"

From rukapedia
Jump to: navigation, search
Line 1: Line 1:
 
This document describes a RESTful API that provides access to the same stop, route and schedule information that is used to power the [http://thebus.ca Charlottetown Interactive Transit Map].
 
This document describes a RESTful API that provides access to the same stop, route and schedule information that is used to power the [http://thebus.ca Charlottetown Interactive Transit Map].
 +
 +
==Routes==
 +
 +
Returns information on Charlottetown Transit routes.
 +
 +
{| border="1" cellpadding="5" cellspacing="0"
 +
|-
 +
| URL
 +
| '''http://thebus.ca/api/routes'''
 +
|-
 +
| Method
 +
| GET
 +
|-
 +
| Querystring
 +
| None
 +
|-
 +
| Returns
 +
| XML
 +
|}
 +
 +
===Example===
 +
 +
<pre>
 +
# curl http://thebus.ca/api/routes
 +
 +
<?xml version="1.0"?>
 +
<routes>
 +
  <route>
 +
      <number>1</number>
 +
      <name>University Ave. Express</name>
 +
      <markercolour>yellow</markercolour>
 +
      <routecolour>ff0000</routecolour>
 +
      <lightcolour>ff847f</lightcolour>
 +
      <note/>
 +
  </route>
 +
</routes>
 +
</pre>

Revision as of 17:37, 2 September 2008

This document describes a RESTful API that provides access to the same stop, route and schedule information that is used to power the Charlottetown Interactive Transit Map.

Routes

Returns information on Charlottetown Transit routes.

URL http://thebus.ca/api/routes
Method GET
Querystring None
Returns XML

Example

# curl http://thebus.ca/api/routes

<?xml version="1.0"?>
<routes>
   <route>
      <number>1</number>
      <name>University Ave. Express</name>
      <markercolour>yellow</markercolour>
      <routecolour>ff0000</routecolour>
      <lightcolour>ff847f</lightcolour>
      <note/>
   </route>
</routes>