def event_search_api(): g.parser.add_argument('event_id', type=valid_public_id, location='args') g.parser.add_argument('calendar_id', type=valid_public_id, location='args') g.parser.add_argument('title', type=bounded_str, location='args') g.parser.add_argument('description', type=bounded_str, location='args') g.parser.add_argument('location', type=bounded_str, location='args') g.parser.add_argument('starts_before', type=timestamp, location='args') g.parser.add_argument('starts_after', type=timestamp, location='args') g.parser.add_argument('ends_before', type=timestamp, location='args') g.parser.add_argument('ends_after', type=timestamp, location='args') args = strict_parse_args(g.parser, request.args) results = filtering.events( namespace_id=g.namespace.id, account_id=g.namespace.account_id, event_public_id=args['event_id'], calendar_public_id=args['calendar_id'], title=args['title'], description=args['description'], location=args['location'], starts_before=args['starts_before'], starts_after=args['starts_after'], ends_before=args['ends_before'], ends_after=args['ends_after'], limit=args['limit'], offset=args['offset'], source='local', db_session=g.db_session) return g.encoder.jsonify(results)
def event_search_api(): g.parser.add_argument('event_id', type=valid_public_id, location='args') g.parser.add_argument('calendar_id', type=valid_public_id, location='args') g.parser.add_argument('title', type=bounded_str, location='args') g.parser.add_argument('description', type=bounded_str, location='args') g.parser.add_argument('location', type=bounded_str, location='args') g.parser.add_argument('starts_before', type=timestamp, location='args') g.parser.add_argument('starts_after', type=timestamp, location='args') g.parser.add_argument('ends_before', type=timestamp, location='args') g.parser.add_argument('ends_after', type=timestamp, location='args') g.parser.add_argument('view', type=bounded_str, location='args') args = strict_parse_args(g.parser, request.args) results = filtering.events(namespace_id=g.namespace.id, event_public_id=args['event_id'], calendar_public_id=args['calendar_id'], title=args['title'], description=args['description'], location=args['location'], starts_before=args['starts_before'], starts_after=args['starts_after'], ends_before=args['ends_before'], ends_after=args['ends_after'], limit=args['limit'], offset=args['offset'], source='local', view=args['view'], db_session=g.db_session) return g.encoder.jsonify(results)
def event_search_api(): g.parser.add_argument('event_id', type=valid_public_id, location='args') g.parser.add_argument('calendar_id', type=valid_public_id, location='args') g.parser.add_argument('title', type=bounded_str, location='args') g.parser.add_argument('description', type=bounded_str, location='args') g.parser.add_argument('location', type=bounded_str, location='args') g.parser.add_argument('busy', type=strict_bool, location='args') g.parser.add_argument('starts_before', type=timestamp, location='args') g.parser.add_argument('starts_after', type=timestamp, location='args') g.parser.add_argument('ends_before', type=timestamp, location='args') g.parser.add_argument('ends_after', type=timestamp, location='args') g.parser.add_argument('view', type=bounded_str, location='args') g.parser.add_argument('expand_recurring', type=strict_bool, location='args') g.parser.add_argument('show_cancelled', type=strict_bool, location='args') args = strict_parse_args(g.parser, request.args) results = filtering.events( namespace_id=g.namespace.id, event_public_id=args['event_id'], calendar_public_id=args['calendar_id'], title=args['title'], description=args['description'], location=args['location'], busy=args['busy'], starts_before=args['starts_before'], starts_after=args['starts_after'], ends_before=args['ends_before'], ends_after=args['ends_after'], limit=args['limit'], offset=args['offset'], view=args['view'], expand_recurring=args['expand_recurring'], show_cancelled=args['show_cancelled'], db_session=g.db_session) return g.encoder.jsonify(results)