summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/api-objects.rst1
-rw-r--r--docs/api-usage.rst4
-rw-r--r--docs/gl_objects/namespaces.py7
-rw-r--r--docs/gl_objects/namespaces.rst21
-rw-r--r--docs/gl_objects/runners.rst2
5 files changed, 32 insertions, 3 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/api-usage.rst b/docs/api-usage.rst
index ca85fbd..976a3a0 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -99,9 +99,9 @@ actions on the GitLab resources. For example:
.. code-block:: python
- # get a tarball of the git repository
+ # star a git repository
project = gl.projects.get(1)
- project.archive()
+ project.star()
Pagination
==========
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``.