def METHOD_NAME(self, request: Request, project, date_filter_optional=False):
    """Similar to the version on the organization just for a single project."""
    # get the top level params -- projects, time range, and environment
    # from the request
    try:
        start, end = get_date_range_from_params(request.GET, optional=date_filter_optional)
    except InvalidParams as e:
        raise ProjectEventsError(str(e))
    environments = [env.name for env in get_environments(request, project.organization)]
    params = {"start": start, "end": end, "project_id": [project.id]}
    if environments:
        params["environment"] = environments
    return params