diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-06 14:26:33 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-06 14:26:33 +0200 |
commit | e3ac32f76a54e06c9c465c5acd41398988154fe9 (patch) | |
tree | facbe099d8c12626382fe55ea442af35b9332d6a | |
parent | e6ffd69bc745ce1a5b857fc248a3bef793e30138 (diff) | |
parent | e1f5e1560e53019d45b113a71916ad9a7695afeb (diff) | |
download | gitlab-e3ac32f76a54e06c9c465c5acd41398988154fe9.tar.gz |
Merge branch 'master' of github.com:gpocentek/python-gitlab
-rw-r--r-- | docs/api-objects.rst | 1 | ||||
-rw-r--r-- | docs/api-usage.rst | 4 | ||||
-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 |
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``. |