Skip to content

Commit

Permalink
Update API documentation for MOTIS 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbruechert committed Dec 19, 2024
1 parent 8f3ec16 commit 8f5a6ef
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 15 deletions.
6 changes: 1 addition & 5 deletions website/content/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
-->

<style>
h2 {
margin-top: 50px;
}

.app-icon {
margin: 10px;
}
Expand All @@ -39,7 +35,7 @@ <h2>Apps That Use Transitous</h2>

<h2>Use In Your App</h2>
<p>Transitous provides a free to use API that can provide journey planning in your app.</p>
<a class="btn btn-primary text-black" href="https://routing.spline.de/doc/index.html"><i class="bi bi-arrow-right m-1"></i>Developer Documentation</a>
<a class="btn btn-primary text-black" href="/api/"><i class="bi bi-arrow-right m-1"></i>Developer Documentation</a>

<h2>Public Transport Coverage</h2>
<p>If you know where to find public transport data for your region, or if you are a public transport operator, you can help by adding the feed to our data set.</p>
Expand Down
24 changes: 24 additions & 0 deletions website/content/api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "API"
omit_header_text: true
featured_image: ''
menu: main
---

<h1>MOTIS 2 API</h1>

<p>Transitous provides the MOTIS 2 API. It is the first stable and versioned MOTIS API, and is incompatible with previous development versions of the API.</p>

<p>Our API endpoint is located at <code>https://api.transitous.org/api/v1/</code>.</p>

<a class="btn btn-primary text-black" href="https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml">API Documentation</a>

<h2>Legacy API (MOTIS 0.x)</h1>

<p>For a few more weeks, the legacy API is available at <code>https://routing.spline.de/api/</code> for compatibility with apps that have not been updated yet.</p>

<p>It will be shut down 1 month after the deployment of MOTIS 2.</p>

<p>The data on the legacy server is no longer kept up to date.</p>

<a class="btn btn-primary text-black" href="https://routing.spline.de/doc/index.html">API Documentation</a>
10 changes: 0 additions & 10 deletions website/layouts/shortcodes/source-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<style>
h3 {
margin-top: 30px;
}

h2 {
margin-top: 60px;
}
</style>

{{ range $index, $source := $.Site.Data.license }}
{{ if not (compare.Eq ((index $.Site.Data.license $index).region_name) ((index $.Site.Data.license (sub $index 1)).region_name)) }}
<h2>{{ .region_name }}</h2>
Expand Down
8 changes: 8 additions & 0 deletions website/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@
.text-xs {
font-size: 10px;
}

h3 {
margin-top: 30px;
}

h2 {
margin-top: 60px;
}

0 comments on commit 8f5a6ef

Please sign in to comment.