File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ with the GitLab server error message:
162162 ...
163163 GitlabListError: 400 : sort does not have a valid value
164164
165+ .. _conflicting_parameters :
166+
167+ Conflicting Parameters
168+ ======================
169+
165170You can use the ``query_parameters `` argument to send arguments that would
166171conflict with python or python-gitlab when using them as kwargs:
167172
Original file line number Diff line number Diff line change @@ -78,3 +78,23 @@ access an attribute that is shadowed by python-gitlab's own methods or managers.
7878
7979You can use the object's ``attributes `` dictionary to access it directly instead.
8080See the :ref: `objects ` section for more details on how attributes are exposed.
81+
82+ .. _conflicting_parameters_faq :
83+
84+ I cannot use the parameter ``path `` (or some other parameter) as it conflicts with the library
85+ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
86+
87+ ``path `` is used by the python-gitlab library and cannot be used as a parameter
88+ if wanting to send it to the GitLab instance. You can use the
89+ ``query_parameters `` argument to send arguments that would conflict with python
90+ or python-gitlab when using them as kwargs:
91+
92+ .. code-block :: python
93+
94+ # # invalid, as ``path`` is interpreted by python-gitlab as the Path or full
95+ # # URL to query ('/projects' or 'http://whatever/v4/api/projects')
96+ project.commits.list(path = ' some_file_path' , iterator = True )
97+
98+ project.commits.list(query_parameters = {' path' : ' some_file_path' }, iterator = True ) # OK
99+
100+ See :ref: `Conflicting Parameters <conflicting_parameters >` for more information.
You can’t perform that action at this time.
0 commit comments