-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSearch.js
More file actions
36 lines (30 loc) · 788 Bytes
/
Search.js
File metadata and controls
36 lines (30 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// @flow
import { request, required } from './Client'
// flow types
import type { FetchOptions } from './Client';
import type {
SearchIssuesResult,
SearchRepositoriesResult,
} from './definitions';
type searchIssuesParams = {
q: string,
page?: number,
per_page?: number,
}
export function searchIssues(
params: searchIssuesParams,
options?: FetchOptions
): Promise<SearchIssuesResult> {
return request(`/search/issues`, params, "GET", options);
}
type searchRepositoriesParams = {
q: string,
page?: number,
per_page?: number,
}
export function searchRepositories(
params: searchRepositoriesParams,
options?: FetchOptions
): Promise<SearchRepositoriesResult> {
return request(`/search/repositories`, params, "GET", options);
}