diff --git a/docs/build/doctrees/api.doctree b/docs/build/doctrees/api.doctree new file mode 100644 index 0000000..2a6c2a1 Binary files /dev/null and b/docs/build/doctrees/api.doctree differ diff --git a/docs/build/doctrees/api.migrations.doctree b/docs/build/doctrees/api.migrations.doctree new file mode 100644 index 0000000..e894bc2 Binary files /dev/null and b/docs/build/doctrees/api.migrations.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 9af7875..f37ce62 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/modules.doctree b/docs/build/doctrees/modules.doctree index 8ed5337..14a6b5f 100644 Binary files a/docs/build/doctrees/modules.doctree and b/docs/build/doctrees/modules.doctree differ diff --git a/docs/build/doctrees/pt_map.doctree b/docs/build/doctrees/pt_map.doctree index 74d5b2b..0e79d2b 100644 Binary files a/docs/build/doctrees/pt_map.doctree and b/docs/build/doctrees/pt_map.doctree differ diff --git a/docs/build/doctrees/pt_map.migrations.doctree b/docs/build/doctrees/pt_map.migrations.doctree index c2e035b..225837e 100644 Binary files a/docs/build/doctrees/pt_map.migrations.doctree and b/docs/build/doctrees/pt_map.migrations.doctree differ diff --git a/docs/build/html/_sources/api.migrations.rst.txt b/docs/build/html/_sources/api.migrations.rst.txt new file mode 100644 index 0000000..93e9150 --- /dev/null +++ b/docs/build/html/_sources/api.migrations.rst.txt @@ -0,0 +1,10 @@ +api.migrations package +====================== + +Module contents +--------------- + +.. automodule:: api.migrations + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/api.rst.txt b/docs/build/html/_sources/api.rst.txt new file mode 100644 index 0000000..c79b9a7 --- /dev/null +++ b/docs/build/html/_sources/api.rst.txt @@ -0,0 +1,68 @@ +api package +=========== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + +Submodules +---------- + +api.admin module +---------------- + +.. automodule:: api.admin + :members: + :undoc-members: + :show-inheritance: + +api.apps module +--------------- + +.. automodule:: api.apps + :members: + :undoc-members: + :show-inheritance: + +api.models module +----------------- + +.. automodule:: api.models + :members: + :undoc-members: + :show-inheritance: + +api.tests module +---------------- + +.. automodule:: api.tests + :members: + :undoc-members: + :show-inheritance: + +api.urls module +--------------- + +.. automodule:: api.urls + :members: + :undoc-members: + :show-inheritance: + +api.views module +---------------- + +.. automodule:: api.views + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: api + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/modules.rst.txt b/docs/build/html/_sources/modules.rst.txt index 7ef501b..ae8116d 100644 --- a/docs/build/html/_sources/modules.rst.txt +++ b/docs/build/html/_sources/modules.rst.txt @@ -7,3 +7,4 @@ transport_accessibility manage pt_map transport_accessibility + api diff --git a/docs/build/html/_sources/pt_map.migrations.rst.txt b/docs/build/html/_sources/pt_map.migrations.rst.txt index 0ee9b23..96e8bfb 100644 --- a/docs/build/html/_sources/pt_map.migrations.rst.txt +++ b/docs/build/html/_sources/pt_map.migrations.rst.txt @@ -12,82 +12,18 @@ pt\_map.migrations.0001\_initial module :undoc-members: :show-inheritance: -pt\_map.migrations.0002\_alter\_calendardate\_unique\_together\_and\_more module --------------------------------------------------------------------------------- +pt\_map.migrations.0002\_initial module +--------------------------------------- -.. automodule:: pt_map.migrations.0002_alter_calendardate_unique_together_and_more +.. automodule:: pt_map.migrations.0002_initial :members: :undoc-members: :show-inheritance: -pt\_map.migrations.0003\_alter\_calendar\_service\_id\_and\_more module ------------------------------------------------------------------------ +pt\_map.migrations.0003\_faretransferrule\_feed\_info\_id module +---------------------------------------------------------------- -.. automodule:: pt_map.migrations.0003_alter_calendar_service_id_and_more - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0004\_alter\_agency\_agency\_id\_alter\_calendar\_service\_id\_and\_more module --------------------------------------------------------------------------------------------------- - -.. automodule:: pt_map.migrations.0004_alter_agency_agency_id_alter_calendar_service_id_and_more - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0005\_level\_remove\_stop\_tts\_stop\_name\_agency\_agency\_lang\_and\_more module ------------------------------------------------------------------------------------------------------ - -.. automodule:: pt_map.migrations.0005_level_remove_stop_tts_stop_name_agency_agency_lang_and_more - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0006\_alter\_route\_route\_type module ---------------------------------------------------------- - -.. automodule:: pt_map.migrations.0006_alter_route_route_type - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0007\_location\_translation\_attribution\_bookingrule module -------------------------------------------------------------------------------- - -.. automodule:: pt_map.migrations.0007_location_translation_attribution_bookingrule - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0008\_area\_farelegrule\_faremedia\_fareproduct\_and\_more module ------------------------------------------------------------------------------------- - -.. automodule:: pt_map.migrations.0008_area_farelegrule_faremedia_fareproduct_and_more - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0009\_rename\_faremedia\_faremedium module -------------------------------------------------------------- - -.. automodule:: pt_map.migrations.0009_rename_faremedia_faremedium - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0010\_rename\_location\_locationgeojson module ------------------------------------------------------------------ - -.. automodule:: pt_map.migrations.0010_rename_location_locationgeojson - :members: - :undoc-members: - :show-inheritance: - -pt\_map.migrations.0011\_rename\_locationgeojson\_locationsgeojson module -------------------------------------------------------------------------- - -.. automodule:: pt_map.migrations.0011_rename_locationgeojson_locationsgeojson +.. automodule:: pt_map.migrations.0003_faretransferrule_feed_info_id :members: :undoc-members: :show-inheritance: diff --git a/docs/build/html/_sources/pt_map.rst.txt b/docs/build/html/_sources/pt_map.rst.txt index a67d9d9..913cdf1 100644 --- a/docs/build/html/_sources/pt_map.rst.txt +++ b/docs/build/html/_sources/pt_map.rst.txt @@ -75,6 +75,14 @@ pt\_map.views module :undoc-members: :show-inheritance: +pt\_map.query module +-------------------- + +.. automodule:: pt_map.query + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs/build/html/api.html b/docs/build/html/api.html new file mode 100644 index 0000000..2fe98e2 --- /dev/null +++ b/docs/build/html/api.html @@ -0,0 +1,252 @@ + + + + + + + api package — Transport Accessibility 0.2 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

api package

+
+

Subpackages

+
+
+
+
+

Submodules

+
+
+

api.admin module

+
+
+

api.apps module

+
+
+class api.apps.ApiConfig(app_name, app_module)
+

Bases: AppConfig

+
+
+default_auto_field = 'django.db.models.BigAutoField'
+
+ +
+
+name = 'api'
+
+ +
+ +
+
+

api.models module

+
+
+

api.tests module

+
+
+

api.urls module

+
+
+

api.views module

+
+

Views

+

Views serving (mostly JSON) data via HTTP, no actual web pages.

+
+

Functions

+
+
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.

+
+
+
+
+
+
+api.views.data(request)
+

Handle database requests from the frontend. Using Http semantics to specify what to do with the data.

+
+

Request

+
+
PUT

Create a new object if no object with the given primary key exists in the database or delete and replace an existing object. +Body must be a json dict of lists of fully specified, valid models. Primary keys can be omitted and will be ignored if the element does not exist in the database. +If primary keys are given, the elements are deleted and replaced. Note that if there is an error in creating the new object, the object to replace will still probably already have been deleted. +Successful response is 200 with a list of primary keys of the created and replaced objects.

+
+
PATCH

Modify an existing objects given the instructions in the body. +Body must be a json dict of lists of fields to change and their valid values existing objects in the database, identified by their valid primary keys. +Responds 400 if any of the primary keys given does not exist. +Successful response is 200 with a list of the primary keys of the modified objects.

+
+
GET

Return json of models identified by primary keys. +Responds 400 if any of the requested pks does not exist.

+
+
DELETE

Delete models with given primary keys if they exist. +Responds 400 if any of the primary keys given does not exist in the database. +Successful response is 200 and the number of deleted models.

+
+
+
+
+ +
+
+api.views.timetable(request)
+

Lookup timetable data for given routes.

+
+

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:

+
{
+    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]
+    }
+}
+
+
+
+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/build/html/api.migrations.html b/docs/build/html/api.migrations.html new file mode 100644 index 0000000..641bd62 --- /dev/null +++ b/docs/build/html/api.migrations.html @@ -0,0 +1,134 @@ + + + + + + + api.migrations package — Transport Accessibility 0.2 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

api.migrations package

+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index f720e1f..5582474 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -132,6 +132,8 @@
  • agency_name (pt_map.models.Agency attribute)
  • agency_phone (pt_map.models.Agency attribute) +
  • +
  • agency_set (pt_map.models.FeedInfo attribute)
  • agency_timezone (pt_map.models.Agency attribute)
  • @@ -139,10 +141,61 @@
  • amount (pt_map.models.FareProduct attribute)
  • -
  • Area (class in pt_map.models) +
  • + api + +
  • +
  • + api.admin + +
  • +
  • + api.apps + +
  • +
  • + api.models + +
  • +
  • + api.tests + +