summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/audit_events.py
blob: d9d4119487b9c50d2a9f2986fae01b4840467242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""
GitLab API:
https://docs.gitlab.com/ee/api/audit_events.html#project-audit-events
"""

from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import RetrieveMixin

__all__ = [
    "ProjectAudit",
    "ProjectAuditManager",
]


class ProjectAudit(RESTObject):
    _id_attr = "id"


class ProjectAuditManager(RetrieveMixin, RESTManager):
    _path = "/projects/%(project_id)s/audit_events"
    _obj_cls = ProjectAudit
    _from_parent_attrs = {"project_id": "id"}
    _list_filters = ("created_after", "created_before")