x
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div class="overflow-x-auto rounded-lg border border-line"> <table class="w-full text-left text-sm border-collapse"> <caption class="sr-only">Google Search</caption> <thead class="bg-surface-subtle text-xs font-semibold uppercase tracking-wide text-ink-muted"> <tr> <th scope="col" class="px-4 py-2.5">Name</th> <th scope="col" class="px-4 py-2.5">Type</th> <th scope="col" class="px-4 py-2.5">Description</th> </tr> </thead> <tbody class="divide-y divide-line"> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">engine<span class="text-badge-danger-ink"><span aria-hidden="true">*</span><span class="sr-only">required</span></span></span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">string</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Engine that retrieves the data; fixed per API (see Apis::BY_ENGINE keys).</p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">api_key<span class="text-badge-danger-ink"><span aria-hidden="true">*</span><span class="sr-only">required</span></span></span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">string</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>SearchApi.io API key; alternatively send 'Authorization: Bearer <key>'.</p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">zero_retention</span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">boolean</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Enterprise-only: disables all logging and persistent storage of the search.</p> <p class="mt-2"> <span class="rounded-sm bg-surface-subtle px-1.5 py-0.5 font-mono text-xs text-ink-muted"> default: false </span> </p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">q<span class="text-badge-danger-ink"><span aria-hidden="true">*</span><span class="sr-only">required</span></span></span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">string</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Search query; most engines accept native operators and advanced filters.</p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">device</span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">enum</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Device to emulate for the search.</p> <ul class="mt-2 flex flex-wrap gap-1.5"> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line-strong text-ink"> desktop<span class="sr-only"> (default)</span> </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> mobile </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> tablet </li> </ul> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">google_domain</span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">string</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Google domain to query, e.g. google.com, google.de.</p> <p class="mt-2"> <span class="rounded-sm bg-surface-subtle px-1.5 py-0.5 font-mono text-xs text-ink-muted"> default: google.com </span> </p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">gl</span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">enum</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Country of the search (two-letter country code).</p> <ul class="mt-2 flex flex-wrap gap-1.5"> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line-strong text-ink"> us<span class="sr-only"> (default)</span> </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> af </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> al </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> dz </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> as </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ad </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ao </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ai </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> aq </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ag </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ar </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> am </li> </ul> <p class="mt-2 text-xs text-ink-muted"> 227 more values </p> </td> </tr> <tr class="align-top transition-colors hover:bg-surface-subtle"> <th scope="row" class="px-4 py-2.5 text-left font-normal"> <span class="inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-px font-mono text-sm leading-5 bg-surface-sunk text-ink whitespace-nowrap">hl</span> </th> <td class="px-4 py-2.5 font-mono text-xs text-ink-muted">enum</td> <td class="px-4 py-2.5 text-sm text-ink"> <p>Interface language of the search (two-letter language code).</p> <ul class="mt-2 flex flex-wrap gap-1.5"> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line-strong text-ink"> en<span class="sr-only"> (default)</span> </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> af </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ak </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> sq </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> am </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> ar </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> hy </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> az </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> eu </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> be </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> bem </li> <li class="relative rounded-sm border px-1.5 py-0.5 font-mono text-xs border-line text-ink-muted"> bn </li> </ul> <p class="mt-2 text-xs text-ink-muted"> 134 more values </p> </td> </tr> </tbody> </table></div>1
2
3
4
5
6
7
8
<% api = Searchapi::Apis::BY_ENGINE.fetch("google") %><% headers = ParameterRowComponent::COLUMNS.map { |column| column.to_s.capitalize } %><%= render TableComponent.new(headers: headers, caption: api.label) do %> <% api.params.first(8).each do |parameter| %> <%= render ParameterRowComponent.new(parameter: parameter) %> <% end %><% end %>The reference the docs actually render: TableComponent for the frame, ParameterRowComponent for the rows, and COLUMNS shared between them so which column is which cannot drift.
No params configured.