@microsoft/webiq 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -140,9 +140,11 @@ const results = await client.videos.search(query, {
140
140
  ### Browse
141
141
 
142
142
  ```typescript
143
+ import { BrowseContentFormat, LiveCrawlMode } from '@microsoft/webiq';
144
+
143
145
  const page = await client.browse.fetch(url, {
144
146
  maxLength: 10000, // 1-500000
145
- liveCrawl: 'fallback', // "none" (default) | "fallback" | "force"
147
+ liveCrawl: LiveCrawlMode.FALLBACK, // NONE (default), FALLBACK, FORCE
146
148
  includeWebLinks: true,
147
149
  includeImageLinks: true,
148
150
  renderDynamicPages: false,
@@ -173,7 +175,7 @@ const results = await client.images.search(query, {
173
175
  Given a query, classic search will search and retrieve content from webpages, images, videos, news, weather, sports, etc.
174
176
 
175
177
  ```typescript
176
- import { ContentFormat, SafeSearchMode } from '@microsoft/webiq';
178
+ import { ContentFormat, SafeSearch } from '@microsoft/webiq';
177
179
 
178
180
  const response = await client.classic.search(query, {
179
181
  maxAnswerTypes: 6, // 1-6, default 6
@@ -185,7 +187,7 @@ const response = await client.classic.search(query, {
185
187
  contentFormat: ContentFormat.HTML,
186
188
  freshness: 'month', // day, week, month, year, or date range
187
189
  responseFilter: ['webResults', 'newsResults'], // Answer types to include
188
- safeSearch: SafeSearchMode.MODERATE, // OFF, MODERATE, STRICT
190
+ safeSearch: SafeSearch.STRICT, // OFF, STRICT
189
191
  });
190
192
  // response.querySignals → {originalQuery, normalizedQuery, isDefensive, isAdult, isNav, isFresh}
191
193
  // response.traceId → string