-
Notifications
You must be signed in to change notification settings - Fork 0
/
googlethis.d.ts
57 lines (50 loc) 路 1.06 KB
/
googlethis.d.ts
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
declare module 'googlethis' {
export interface GoogleSearchResults {
results: FeaturedSnippet[]
knowledge_panel: KnowledgePanel
featured_snippet: FeaturedSnippet
top_stories: TopStory[]
people_also_ask: string[]
}
export interface FeaturedSnippet {
title: string
description: string
url: string
favicons?: Favicons
}
export interface Favicons {
high_res: string
low_res: string
}
export interface KnowledgePanel {
title: string
description: string
url: string
born: string
height: string
spouse: string
nba_draft: string
salary: string
current_teams: string
children: string
type: string
images: Image[]
}
export interface Image {
url: string
source: string
}
export interface TopStory {
description: string
url: string
}
export interface Options {
page?: number
safe?: boolean
addditional_params?: Record<string, unknown>
}
export function search(
query: string,
options?: Options
): Promise<GoogleSearchResults>
}