Skip to content

Commit

Permalink
[docs] Add a note about GroupProject limited API
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Sep 5, 2018
1 parent 6f80380 commit 9e60364
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions docs/gl_objects/groups.rst
Expand Up @@ -31,6 +31,15 @@ List a group's projects::

projects = group.projects.list()

.. note::

``GroupProject`` objects returned by this API call are very limited, and do
not provide all the features of ``Project`` objects. If you need to
manipulate projects, create a new ``Project`` object::

first_group_project = group.projects.list()[0]
manageable_project = gl.projects.get(first_group_project.id, lazy=True)

You can filter and sort the result using the following parameters:

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

subgroups = group.subgroups.list()

# The GroupSubgroup objects don't expose the same API as the Group
# objects. If you need to manipulate a subgroup as a group, create a new
# Group object:
real_group = gl.groups.get(subgroup_id, lazy=True)
real_group.issues.list()
.. note::

The ``GroupSubgroup`` objects don't expose the same API as the ``Group``
objects. If you need to manipulate a subgroup as a group, create a new
``Group`` object::

real_group = gl.groups.get(subgroup_id, lazy=True)
real_group.issues.list()

Group custom attributes
=======================
Expand Down

0 comments on commit 9e60364

Please sign in to comment.