ZWeb.API.Flat.BusRoutesController (Portico/Z v0.1.0)

API endpoint for CRUD functions on ZSchemas.Flat.BusRoute data through Z.Flat

Link to this section Summary

Functions

POST /api/flat/bus_routes

DELETE /api/flat/bus_routes/:portico_id

GET /api/flat/bus_routes

Link to this section Functions

Link to this function

create(conn, map)

POST /api/flat/bus_routes

Create/update bus routes.

Expects an bus_routes key, containing a JSON array where each element is a structure corresponding to ZSchemas.Flat.BusRoute.

Will update in the case that a portico_id is sent, matching an existing BusRoute. Otherwise, will create a new BusRoute.

Link to this function

delete(conn, map)

DELETE /api/flat/bus_routes/:portico_id

Destroy a bus route, by portico_id

Link to this function

index(conn, params)

GET /api/flat/bus_routes

List bus routes

Parameters

Any parameters will be passed directly to Z.Repo.get_all_by/3