summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-08-04 08:27:18 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-08-04 08:27:18 +0200
commit1f52cd2df35dab33dbf7429c8d514443278b549a (patch)
treed98ccb4db7b892648b08d01d385be8e82d971173
parente0f2290fdbbb8d2ee4c9fcb9e531b04bb69232fa (diff)
downloadgitlab-1f52cd2df35dab33dbf7429c8d514443278b549a.tar.gz
document namespaces API
-rw-r--r--docs/api-objects.rst1
-rw-r--r--docs/gl_objects/namespaces.py7
-rw-r--r--docs/gl_objects/namespaces.rst21
-rw-r--r--docs/gl_objects/runners.rst2
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``.