Skip to content

Commit 29d1a01

Browse files
committed
Clear up documentation
1 parent e4e9e5b commit 29d1a01

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ and this project adheres to
2323

2424
### Removed
2525

26+
- Remove all types for engine parameters. SerpApi's
27+
[documentation](https://serpapi.com/search-api) should be the only source of
28+
truth for valid engines and their parameters.
29+
2630
## [1.1.1] - 2023-02-15
2731

2832
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ import { getJson } from "https://deno.land/x/serpapi/mod.ts";
7474

7575
## Features
7676

77-
- TypeScript types such as supported parameters and function argument types.
77+
- TypeScript support.
7878
- Works out-of-the-box with [Node.js](https://www.npmjs.com/package/serpapi) and
7979
[Deno](https://deno.land/x/serpapi).
8080
- Promises and async/await support.

docs/migrating_from_google_search_results_nodejs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ migrate over to the `serpapi` npm package.
6666

6767
## Added
6868

69-
- TypeScript types for supported parameters.
69+
- TypeScript support.
7070
- First-class Promises support.
7171
```js
7272
const json = await getJson({ engine: "google", q: "coffee" });
@@ -77,8 +77,10 @@ migrate over to the `serpapi` npm package.
7777
config.api_key = "new_api_key";
7878
config.timeout = 20000; // 20 seconds
7979
```
80-
- Error classes (`MissingApiKeyError` and `InvalidTimeoutError`).
80+
- Error classes (`MissingApiKeyError`, `InvalidTimeoutError` and
81+
`InvalidArgumentError`).
8182
```js
8283
getJson({ engine: "google", api_key: "" }); // Throws `MissingApiKeyError`
8384
getAccount({ api_key: API_KEY, timeout: 0 }); // Throws `InvalidTimeoutError`
85+
getJson("google"); // Throws `InvalidArgumentError`
8486
```

0 commit comments

Comments
 (0)