Show More
@@ -32,7 +32,7 b' log = logging.getLogger(__name__)' | |||||
32 |
|
32 | |||
33 |
|
33 | |||
34 | @jsonrpc_method() |
|
34 | @jsonrpc_method() | |
35 | def search(request, apiuser, search_query, search_type, page_limit=Optional(10), page=Optional(1), search_sort=Optional('newfirst'), repo_name=Optional(None)): |
|
35 | def search(request, apiuser, search_query, search_type, page_limit=Optional(10), page=Optional(1), search_sort=Optional('newfirst'), repo_name=Optional(None), repo_group_name=Optional(None)): | |
36 | """ |
|
36 | """ | |
37 | Search |
|
37 | Search | |
38 |
|
38 | |||
@@ -40,21 +40,29 b' def search(request, apiuser, search_quer' | |||||
40 | :type apiuser: AuthUser |
|
40 | :type apiuser: AuthUser | |
41 | :param search_query: Search query. |
|
41 | :param search_query: Search query. | |
42 | :type search_query: str |
|
42 | :type search_query: str | |
43 |
:param search_type: Search type. |
|
43 | :param search_type: Search type. The following are valid options: | |
|
44 | * commit | |||
|
45 | * content | |||
|
46 | * path | |||
44 | :type search_type: str |
|
47 | :type search_type: str | |
45 | :param page_limit: Page item limit. Default 10 items. |
|
48 | :param page_limit: Page item limit, from 1 to 500. Default 10 items. | |
46 | :type page_limit: Optional(int) |
|
49 | :type page_limit: Optional(int) | |
47 | :param page: Page number. Default first page. |
|
50 | :param page: Page number. Default first page. | |
48 | :type page: Optional(int) |
|
51 | :type page: Optional(int) | |
49 | :param search_sort: Search sort. Default newfirst. |
|
52 | :param search_sort: Search sort order. Default newfirst. The following are valid options: | |
|
53 | * newfirst | |||
|
54 | * oldfirst | |||
50 | :type search_sort: Optional(str) |
|
55 | :type search_sort: Optional(str) | |
51 | :param repo_name: Filter by one repo. Default is all. |
|
56 | :param repo_name: Filter by one repo. Default is all. | |
52 | :type repo_name: Optional(str) |
|
57 | :type repo_name: Optional(str) | |
|
58 | :param repo_group_name: Filter by one repo group. Default is all. | |||
|
59 | :type repo_group_name: Optional(str) | |||
53 | """ |
|
60 | """ | |
54 |
|
61 | |||
55 | searcher = searcher_from_config(request.registry.settings) |
|
62 | searcher = searcher_from_config(request.registry.settings) | |
56 | data = {'execution_time': ''} |
|
63 | data = {'execution_time': ''} | |
57 | repo_name = Optional.extract(repo_name) |
|
64 | repo_name = Optional.extract(repo_name) | |
|
65 | repo_group_name = Optional.extract(repo_group_name) | |||
58 |
|
66 | |||
59 | schema = search_schema.SearchParamsSchema() |
|
67 | schema = search_schema.SearchParamsSchema() | |
60 |
|
68 |
General Comments 0
You need to be logged in to leave comments.
Login now