@@ -9,24 +9,24 @@ string. The following constants are provided to represent the possible scopes:
99
1010* Shared scopes (global, group and project):
1111
12- + ``gitlab.SEARCH_SCOPE_PROJECTS ``: ``projects ``
13- + ``gitlab.SEARCH_SCOPE_ISSUES ``: ``issues ``
14- + ``gitlab.SEARCH_SCOPE_MERGE_REQUESTS ``: ``merge_requests ``
15- + ``gitlab.SEARCH_SCOPE_MILESTONES ``: ``milestones ``
16- + ``gitlab.SEARCH_SCOPE_WIKI_BLOBS ``: ``wiki_blobs ``
17- + ``gitlab.SEARCH_SCOPE_COMMITS ``: ``commits ``
18- + ``gitlab.SEARCH_SCOPE_BLOBS ``: ``blobs ``
19- + ``gitlab.SEARCH_SCOPE_USERS ``: ``users ``
12+ + ``gitlab.const. SEARCH_SCOPE_PROJECTS ``: ``projects ``
13+ + ``gitlab.const. SEARCH_SCOPE_ISSUES ``: ``issues ``
14+ + ``gitlab.const. SEARCH_SCOPE_MERGE_REQUESTS ``: ``merge_requests ``
15+ + ``gitlab.const. SEARCH_SCOPE_MILESTONES ``: ``milestones ``
16+ + ``gitlab.const. SEARCH_SCOPE_WIKI_BLOBS ``: ``wiki_blobs ``
17+ + ``gitlab.const. SEARCH_SCOPE_COMMITS ``: ``commits ``
18+ + ``gitlab.const. SEARCH_SCOPE_BLOBS ``: ``blobs ``
19+ + ``gitlab.const. SEARCH_SCOPE_USERS ``: ``users ``
2020
2121
2222* specific global scope:
2323
24- + ``gitlab.SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES ``: ``snippet_titles ``
24+ + ``gitlab.const. SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES ``: ``snippet_titles ``
2525
2626
2727* specific project scope:
2828
29- + ``gitlab.SEARCH_SCOPE_PROJECT_NOTES ``: ``notes ``
29+ + ``gitlab.const. SEARCH_SCOPE_PROJECT_NOTES ``: ``notes ``
3030
3131
3232Reference
@@ -46,30 +46,30 @@ Examples
4646Search for issues matching a specific string::
4747
4848 # global search
49- gl.search(gitlab.SEARCH_SCOPE_ISSUES, 'regression')
49+ gl.search(gitlab.const. SEARCH_SCOPE_ISSUES, 'regression')
5050
5151 # group search
5252 group = gl.groups.get('mygroup')
53- group.search(gitlab.SEARCH_SCOPE_ISSUES, 'regression')
53+ group.search(gitlab.const. SEARCH_SCOPE_ISSUES, 'regression')
5454
5555 # project search
5656 project = gl.projects.get('myproject')
57- project.search(gitlab.SEARCH_SCOPE_ISSUES, 'regression')
57+ project.search(gitlab.const. SEARCH_SCOPE_ISSUES, 'regression')
5858
5959The ``search() `` methods implement the pagination support::
6060
6161 # get lists of 10 items, and start at page 2
62- gl.search(gitlab.SEARCH_SCOPE_ISSUES, search_str, page=2, per_page=10)
62+ gl.search(gitlab.const. SEARCH_SCOPE_ISSUES, search_str, page=2, per_page=10)
6363
6464 # get a generator that will automatically make required API calls for
6565 # pagination
66- for item in gl.search(gitlab.SEARCH_SCOPE_ISSUES, search_str, as_list=False):
66+ for item in gl.search(gitlab.const. SEARCH_SCOPE_ISSUES, search_str, as_list=False):
6767 do_something(item)
6868
6969The search API doesn't return objects, but dicts. If you need to act on
7070objects, you need to create them explicitly::
7171
72- for item in gl.search(gitlab.SEARCH_SCOPE_ISSUES, search_str, as_list=False):
72+ for item in gl.search(gitlab.const. SEARCH_SCOPE_ISSUES, search_str, as_list=False):
7373 issue_project = gl.projects.get(item['project_id'], lazy=True)
7474 issue = issue_project.issues.get(item['iid'])
7575 issue.state = 'closed'