diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2019-01-13 13:12:17 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2019-01-13 17:20:34 +0100 |
commit | 4bd027aac41c41f7e22af93c7be0058d2faf7fb4 (patch) | |
tree | 314b738f699f5138d91b79841a53bd17f0e62cc5 /docs/gl_objects | |
parent | 89679ce5ee502e57dbe7cec2b78f4f70b85fd3a5 (diff) | |
download | gitlab-no-param-conflicts.tar.gz |
fix(api): avoid parameter conflicts with python and gitlabno-param-conflicts
Provide another way to send data to gitlab with a new `query_parameters`
argument. This parameter can be used to explicitly define the dict of
items to send to the server, so that **kwargs are only used to specify
python-gitlab specific parameters.
Closes #566
Closes #629
Diffstat (limited to 'docs/gl_objects')
-rw-r--r-- | docs/gl_objects/commits.rst | 8 | ||||
-rw-r--r-- | docs/gl_objects/users.rst | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/gl_objects/commits.rst b/docs/gl_objects/commits.rst index 662d9c3..9f48c98 100644 --- a/docs/gl_objects/commits.rst +++ b/docs/gl_objects/commits.rst @@ -27,6 +27,14 @@ results:: commits = project.commits.list(ref_name='my_branch') commits = project.commits.list(since='2016-01-01T00:00:00Z') +.. note:: + + The available ``all`` listing argument conflicts with the python-gitlab + argument. Use ``query_parameters`` to avoid the conflict:: + + commits = project.commits.list(all=True, + query_parameters={'ref_name': 'my_branch'}) + Create a commit:: # See https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions diff --git a/docs/gl_objects/users.rst b/docs/gl_objects/users.rst index d86d2ed..e66ef3a 100644 --- a/docs/gl_objects/users.rst +++ b/docs/gl_objects/users.rst @@ -312,4 +312,6 @@ Examples Get the users activities:: - activities = gl.user_activities.list(all=True, as_list=False) + activities = gl.user_activities.list( + query_parameters={'from': '2018-07-01'}, + all=True, as_list=False) |