def month_api(year, month): posts = month_posts(year, month) or abort(404) return jsonify_posts(posts)
def search_api(): url = request.args.get("url") or abort(404) posts = search_url(url) return jsonify_posts(posts)
def index_api(): return jsonify_posts(index_posts())