Skip to content

Commit ae7d3b0

Browse files
nejchJohnVillalovos
authored andcommitted
docs(usage): refer to upsteam docs instead of custom attributes
1 parent 4d431e5 commit ae7d3b0

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

docs/api-usage.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,28 +102,26 @@ Examples:
102102
for project in group.projects.list(iterator=True):
103103
print(project)
104104
105-
# create a new user
106-
user_data = {'email': 'jen@foo.com', 'username': 'jen', 'name': 'Jen'}
107-
user = gl.users.create(user_data)
108-
print(user)
109-
110105
.. warning::
111106
Calling ``list()`` without any arguments will by default not return the complete list
112107
of items. Use either the ``all=True`` or ``iterator=True`` parameters to get all the
113108
items when using listing methods. See the :ref:`pagination` section for more
114109
information.
115110

116-
You can list the mandatory, optional, and mutually exclusive attributes for object
117-
creation and update with the manager's ``get_create_attrs()`` and ``get_update_attrs()``
118-
methods. They return 3 tuples. The first tuple is the list of mandatory attributes.
119-
The second tuple is the list of optional attributes. The third tuple is the mutually
120-
exclusive attributes:
121-
122111
.. code-block:: python
123112
124-
# v4 only
125-
print(gl.projects.get_create_attrs())
126-
(('name',), ('path', 'namespace_id', ...))
113+
# create a new user
114+
user_data = {'email': 'jen@foo.com', 'username': 'jen', 'name': 'Jen'}
115+
user = gl.users.create(user_data)
116+
print(user)
117+
118+
.. note::
119+
python-gitlab attempts to sync the required, optional, and mutually exclusive attributes
120+
for resource creation and update with the upstream API.
121+
122+
You are encouraged to follow upstream API documentation for each resource to find these -
123+
each resource documented here links to the corresponding upstream resource documentation
124+
at the top of the page.
127125

128126
The attributes of objects are defined upon object creation, and depend on the
129127
GitLab API itself. To list the available information associated with an object

0 commit comments

Comments
 (0)