summaryrefslogtreecommitdiff
path: root/gitlab/base.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-06-18 13:11:12 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-06-18 13:11:12 +0200
commit6e5a6ec1f7c2993697c359b2bcab0e1324e219bc (patch)
tree0c4bbb6579ce48e5bd9c68e410d4db88b316847c /gitlab/base.py
parent1922cd5d9b182902586170927acb758f8a6f614c (diff)
downloadgitlab-6e5a6ec1f7c2993697c359b2bcab0e1324e219bc.tar.gz
minor doc updates
Diffstat (limited to 'gitlab/base.py')
-rw-r--r--gitlab/base.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/base.py b/gitlab/base.py
index ec7091b..df25a36 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -602,6 +602,7 @@ class RESTObject(object):
self.__dict__['_attrs'].update(new_attrs)
def get_id(self):
+ """Returns the id of the resource."""
if self._id_attr is None:
return None
return getattr(self, self._id_attr)
@@ -622,6 +623,16 @@ class RESTObjectList(object):
_list: A GitlabList object
"""
def __init__(self, manager, obj_cls, _list):
+ """Creates an objects list from a GitlabList.
+
+ You should not create objects of this type, but use managers list()
+ methods instead.
+
+ Args:
+ manager: the RESTManager to attach to the objects
+ obj_cls: the class of the created objects
+ _list: the GitlabList holding the data
+ """
self.manager = manager
self._obj_cls = obj_cls
self._list = _list