Fixed and rebuilt sphinx docs

This commit is contained in:
Johannes Randerath
2024-06-21 12:02:35 +02:00
parent 80197208f8
commit 1494dba808
27 changed files with 2433 additions and 482 deletions

View File

@@ -10,14 +10,14 @@ timetable
Fetches timetables for given routes on api/timetable/
data
Serves api/models/
GET
Fetches models given their primary keys
PUT
Creates new model objects or updates them with complete representations. If object with the given primary keys exist, they will be deleted and replaced.
PATCH
Updates models, identified by their primary keys without deleting them. Can be incomplete representations.
DELETE
Deletes models, identified by their primary keys.
GET:
Fetches models given their primary keys
PUT:
Creates new model objects or updates them with complete representations. If object with the given primary keys exist, they will be deleted and replaced.
PATCH:
Updates models, identified by their primary keys without deleting them. Can be incomplete representations.
DELETE:
Deletes models, identified by their primary keys.
"""
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed, HttpRequest
@@ -38,17 +38,20 @@ def timetable(request):
Request
-------
GET
Find timetables for all routes passed via GET.
Successful response is a Json representation of a dict of timetables in the following form:
GET:
Find timetables for all routes passed via GET.
Successful response is a Json representation of a dict of timetables in the following form:
.. highlight:: python
.. code-block:: python
{
route_id (from GET): {
'stop_sequence': [stop_ids for all stops the route server, in order],
'stop_times': {
stop_id (from stop_sequence): [str in the format HH:MM representing stop times]
}
}
stop_id (from stop_sequence): [str in the format HH:MM representing stop times]
}
}
"""
if request.method == "GET":
try: