diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-15 07:35:06 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-15 07:35:06 +0200 |
commit | fd4539715da589df5a81b333e71875289687922d (patch) | |
tree | 68d3f3882680b1f6da370d3367286e72923f2c66 /gitlab/objects.py | |
parent | 417d27cf7c9569d5057dcced5481a6b9c8dfde2a (diff) | |
download | gitlab-fd4539715da589df5a81b333e71875289687922d.tar.gz |
Manage optional parameters for list() and get()
* List these elements in the API doc
* Implement for License objects
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py index ebfba8b..9c6197c 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -183,6 +183,10 @@ class GitlabObject(object): requiredUrlAttrs = [] #: Attributes that are required when retrieving list of objects. requiredListAttrs = [] + #: Attributes that are optional when retrieving list of objects. + optionalListAttrs = [] + #: Attributes that are optional when retrieving single object. + optionalGetAttrs = [] #: Attributes that are required when retrieving single object. requiredGetAttrs = [] #: Attributes that are required when deleting object. @@ -754,6 +758,9 @@ class License(GitlabObject): canCreate = False idAttr = 'key' + optionalListAttrs = ['popular'] + optionalGetAttrs = ['project', 'fullname'] + class LicenseManager(BaseManager): obj_cls = License |