@app.route('<STR_LIT>')<EOL>@requires_auth<EOL>@jsonapi_mediatype<EOL>def events():
db = get_session()<EOL>upcoming_events = db.query(UpcomingEvent).order_by(UpcomingEvent.start)<EOL>recorded_events = db.query(RecordedEvent).order_by(RecordedEvent.start.desc())<EOL>result = [event.serialize() for event in upcoming_events]<EOL>result += [event.serialize() for event in recorded_events]<EOL>return make_data_response(result)<EOL>
Serve a JSON representation of events