@app.route('/calendars/<public_id>', methods=['GET'])
def calendar_read_api(public_id):
 valid_public_id(public_id)
 try:
  calendar = g.db_session.query(Calendar).filter((Calendar.public_id == public_id), (Calendar.namespace_id == g.namespace.id)).one()
 except NoResultFound:
  raise NotFoundError("Couldn't find calendar {0}".format(public_id))
 return g.encoder.jsonify(calendar)

@ app . route ( '/calendars/<public_id>' , methods = [ 'GET' ] ) def calendar_read_api ( public_id ) : valid_public_id ( public_id ) try : calendar = g . db_session . query ( Calendar ) . filter ( ( Calendar . public_id == public_id ) , ( Calendar . namespace_id == g . namespace . id ) ) . one ( ) except NoResultFound : raise NotFoundError ( "Couldn't find calendar {0}" . format ( public_id ) ) return g . encoder . jsonify ( calendar )
get all data for an existing calendar .