def get_tracks_including_unlisted_route(): args = to_dict(request.args) if "filter_deleted" in request.args: args["filter_deleted"] = parse_bool_param( request.args.get("filter_deleted")) if "with_users" in request.args: args["with_users"] = parse_bool_param(request.args.get("with_users")) tracks = get_tracks_including_unlisted(args, request.get_json()) return api_helpers.success_response(tracks)
def get_tracks_including_unlisted_route(): args = to_dict(request.args) if "filter_deleted" in request.args: args["filter_deleted"] = parse_bool_param(request.args.get("filter_deleted")) if "with_users" in request.args: args["with_users"] = parse_bool_param(request.args.get("with_users")) current_user_id = get_current_user_id(required=False) args["current_user_id"] = current_user_id identifiers = request.get_json()["tracks"] args["identifiers"] = identifiers tracks = get_tracks_including_unlisted(args) return api_helpers.success_response(tracks)
def get_unlisted_track(track_id, url_title, handle, current_user_id, endpoint_ns): args = { "identifiers": [{ "handle": handle, "url_title": url_title, "id": track_id }], "filter_deleted": False, "with_users": True, "current_user_id": current_user_id } tracks = get_tracks_including_unlisted(args) if not tracks: abort_not_found(track_id, endpoint_ns) single_track = extend_track(tracks[0]) return success_response(single_track)