Skip to content

Commit 4d00c12

Browse files
committed
docs(api): add examples for resource state events
1 parent af781c1 commit 4d00c12

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

docs/gl_objects/events.rst

+42
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Events
33
######
44

5+
Events
6+
======
7+
58
Reference
69
---------
710

@@ -39,3 +42,42 @@ List the issue events on a project::
3942
List the user events::
4043

4144
events = project.events.list()
45+
46+
Resource state events
47+
=====================
48+
49+
Reference
50+
---------
51+
52+
* v4 API:
53+
54+
+ :class:`gitlab.v4.objects.ProjectIssueResourceStateEvent`
55+
+ :class:`gitlab.v4.objects.ProjectIssueResourceStateEventManager`
56+
+ :attr:`gitlab.v4.objects.ProjectIssue.resourcestateevents`
57+
+ :class:`gitlab.v4.objects.ProjectMergeRequestResourceStateEvent`
58+
+ :class:`gitlab.v4.objects.ProjectMergeRequestResourceStateEventManager`
59+
+ :attr:`gitlab.v4.objects.ProjectMergeRequest.resourcestateevents`
60+
61+
* GitLab API: https://docs.gitlab.com/ee/api/resource_state_events.html
62+
63+
Examples
64+
--------
65+
66+
You can list and get specific resource state events (via their id) for project issues
67+
and project merge requests.
68+
69+
List the state events of a project issue (paginated)::
70+
71+
state_events = issue.resourcestateevents.list()
72+
73+
Get a specific state event of a project issue by its id::
74+
75+
state_event = issue.resourcestateevents.get(1)
76+
77+
List the state events of a project merge request (paginated)::
78+
79+
state_events = mr.resourcestateevents.list()
80+
81+
Get a specific state event of a project merge request by its id::
82+
83+
state_event = mr.resourcestateevents.get(1)

0 commit comments

Comments
 (0)