Skip to content

Commit 1f52cd2

Browse files
author
Gauvain Pocentek
committed
document namespaces API
1 parent e0f2290 commit 1f52cd2

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

docs/api-objects.rst

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ API objects manipulation
99
gl_objects/commits
1010
gl_objects/groups
1111
gl_objects/issues
12+
gl_objects/namespaces
1213
gl_objects/projects
1314
gl_objects/runners
1415
gl_objects/users

docs/gl_objects/namespaces.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# list
2+
namespaces = gl.namespaces.list()
3+
# end list
4+
5+
# search
6+
namespaces = gl.namespaces.list(search='foo')
7+
# end search

docs/gl_objects/namespaces.rst

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
##########
2+
Namespaces
3+
##########
4+
5+
Use :class:`~gitlab.objects.Namespace` objects to manipulate namespaces. The
6+
:attr:`gitlab.Gitlab.namespaces` manager objects provides helper functions.
7+
8+
Examples
9+
========
10+
11+
List namespaces:
12+
13+
.. literalinclude:: namespaces.py
14+
:start-after: # list
15+
:end-before: # end list
16+
17+
Search namespaces:
18+
19+
.. literalinclude:: namespaces.py
20+
:start-after: # search
21+
:end-before: # end search

docs/gl_objects/runners.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Examples
1313

1414
Use the ``list()`` and ``all()`` methods to list runners.
1515

16-
The ``all()`` method accepts a ``scope`` parameter to filter the list. Allowed
16+
The ``all()`` method accepts a ``scope`` parameter to filter the list. Allowed
1717
values for this parameter are ``specific``, ``shared``, ``active``, ``paused``
1818
and ``online``.
1919

0 commit comments

Comments
 (0)