File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ for project in gl.projects(page=1, per_page=10): # pagination
4545#
4646gl.get_current_user(sudo = ' other_user' ) # => 'other_user' CurrentUser object
4747gl.projects(sudo = 2 ) # => list of user 2's projects
48+ # Alternatively, a 'with' statement can be used as follows:
4849with gl.sudo(' other_user' ):
4950 gl.get_current_user() # => 'other_user' CurrentUser object
5051 gl.projects() # => list of 'other_users's projects
@@ -138,5 +139,5 @@ project = gl.project(1)
138139project.find_member(username = ' user' )
139140
140141# The GitLab API has support for more efficient searching of projects by name:
141- gl.find_project_by_name (' name_query' ) # Server-side search
142+ gl.find_projects_by_name (' name_query' ) # Server-side search
142143```
You can’t perform that action at this time.
0 commit comments