Skip to content

Commit

Permalink
document namespaces API
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Aug 4, 2016
1 parent e0f2290 commit 1f52cd2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/api-objects.rst
Expand Up @@ -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
7 changes: 7 additions & 0 deletions 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
21 changes: 21 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion docs/gl_objects/runners.rst
Expand Up @@ -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``.

Expand Down

0 comments on commit 1f52cd2

Please sign in to comment.