'List a Project\'s Events
Return a list of events bound to a project.
Note: This endpoint is experimental and may be removed without notice.
:pparam string organization_slug: the slug of the organization the
groups belong to.
:pparam string project_slug: the slug of the project the groups
belong to.'

@attach_scenarios([list_project_available_samples_scenario])
def get(self, request, project):

    events = Event.objects.filter(project_id=project.id)
    query = request.GET.get('query')
    if query:
        events = events.filter(message__icontains=query)
    return self.paginate(request=request, queryset=events, order_by='-datetime', on_results=(lambda x: serialize(x, request.user)), paginator_cls=DateTimePaginator)
