File tree 2 files changed +25
-0
lines changed
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:
162
162
...
163
163
GitlabListError: 400 : sort does not have a valid value
164
164
165
+ .. _conflicting_parameters :
166
+
167
+ Conflicting Parameters
168
+ ======================
169
+
165
170
You can use the ``query_parameters `` argument to send arguments that would
166
171
conflict with python or python-gitlab when using them as kwargs:
167
172
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.
78
78
79
79
You can use the object's ``attributes `` dictionary to access it directly instead.
80
80
See 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