Skip to content

Commit 9e60364

Browse files
author
Gauvain Pocentek
committed
[docs] Add a note about GroupProject limited API
1 parent 6f80380 commit 9e60364

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

docs/gl_objects/groups.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ List a group's projects::
3131

3232
projects = group.projects.list()
3333

34+
.. note::
35+
36+
``GroupProject`` objects returned by this API call are very limited, and do
37+
not provide all the features of ``Project`` objects. If you need to
38+
manipulate projects, create a new ``Project`` object::
39+
40+
first_group_project = group.projects.list()[0]
41+
manageable_project = gl.projects.get(first_group_project.id, lazy=True)
42+
3443
You can filter and sort the result using the following parameters:
3544

3645
* ``archived``: limit by archived status
@@ -76,11 +85,14 @@ List the subgroups for a group::
7685

7786
subgroups = group.subgroups.list()
7887

79-
# The GroupSubgroup objects don't expose the same API as the Group
80-
# objects. If you need to manipulate a subgroup as a group, create a new
81-
# Group object:
82-
real_group = gl.groups.get(subgroup_id, lazy=True)
83-
real_group.issues.list()
88+
.. note::
89+
90+
The ``GroupSubgroup`` objects don't expose the same API as the ``Group``
91+
objects. If you need to manipulate a subgroup as a group, create a new
92+
``Group`` object::
93+
94+
real_group = gl.groups.get(subgroup_id, lazy=True)
95+
real_group.issues.list()
8496

8597
Group custom attributes
8698
=======================

0 commit comments

Comments
 (0)