diff options
-rw-r--r-- | docs/api-objects.rst | 1 | ||||
-rw-r--r-- | docs/gl_objects/namespaces.py | 7 | ||||
-rw-r--r-- | docs/gl_objects/namespaces.rst | 21 | ||||
-rw-r--r-- | docs/gl_objects/runners.rst | 2 |
4 files changed, 30 insertions, 1 deletions
diff --git a/docs/api-objects.rst b/docs/api-objects.rst index cd50b4c..da093d9 100644 --- a/docs/api-objects.rst +++ b/docs/api-objects.rst @@ -9,6 +9,7 @@ API objects manipulation gl_objects/commits gl_objects/groups gl_objects/issues + gl_objects/namespaces gl_objects/projects gl_objects/runners gl_objects/users diff --git a/docs/gl_objects/namespaces.py b/docs/gl_objects/namespaces.py new file mode 100644 index 0000000..fe50697 --- /dev/null +++ b/docs/gl_objects/namespaces.py @@ -0,0 +1,7 @@ +# list +namespaces = gl.namespaces.list() +# end list + +# search +namespaces = gl.namespaces.list(search='foo') +# end search diff --git a/docs/gl_objects/namespaces.rst b/docs/gl_objects/namespaces.rst new file mode 100644 index 0000000..1819180 --- /dev/null +++ b/docs/gl_objects/namespaces.rst @@ -0,0 +1,21 @@ +########## +Namespaces +########## + +Use :class:`~gitlab.objects.Namespace` objects to manipulate namespaces. The +:attr:`gitlab.Gitlab.namespaces` manager objects provides helper functions. + +Examples +======== + +List namespaces: + +.. literalinclude:: namespaces.py + :start-after: # list + :end-before: # end list + +Search namespaces: + +.. literalinclude:: namespaces.py + :start-after: # search + :end-before: # end search diff --git a/docs/gl_objects/runners.rst b/docs/gl_objects/runners.rst index 08c4bc7..32d6719 100644 --- a/docs/gl_objects/runners.rst +++ b/docs/gl_objects/runners.rst @@ -13,7 +13,7 @@ Examples Use the ``list()`` and ``all()`` methods to list runners. - The ``all()`` method accepts a ``scope`` parameter to filter the list. Allowed +The ``all()`` method accepts a ``scope`` parameter to filter the list. Allowed values for this parameter are ``specific``, ``shared``, ``active``, ``paused`` and ``online``. |