Issue #5548 - Add repo_group_name and docs to search API
pc -
r3605:bdaa3aa1 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -32,7 +32,7
32 32
33 33
34 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 37 Search
38 38
@@ -40,21 +40,29
40 40 :type apiuser: AuthUser
41 41 :param search_query: Search query.
42 42 :type search_query: str
43 :param search_type: Search type. either commit or content.
43 :param search_type: Search type. The following are valid options:
44 * commit
45 * content
46 * path
44 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 49 :type page_limit: Optional(int)
47 50 :param page: Page number. Default first page.
48 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 55 :type search_sort: Optional(str)
51 56 :param repo_name: Filter by one repo. Default is all.
52 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 62 searcher = searcher_from_config(request.registry.settings)
56 63 data = {'execution_time': ''}
57 64 repo_name = Optional.extract(repo_name)
65 repo_group_name = Optional.extract(repo_group_name)
58 66
59 67 schema = search_schema.SearchParamsSchema()
60 68
Comments 0
You need to be logged in to leave comments. Login now