Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSiu committed Jan 18, 2024
1 parent 2f84c48 commit 7749441
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const result = await XenoCanto.search(query, options);

#### Multiple Pages

For results that have multiple pages, you can pass the `page` parameter to the `search` method
For results that have multiple pages, you can pass the `page` parameter to the `search` method:

```ts
// Create query and options
Expand Down Expand Up @@ -142,6 +142,14 @@ const additionalOptions = {
const result = await XenoCanto.search(query, options, 1, additionalOptions);
```

#### Custom Data Fetching

If you wish to implement your own data retrieval methods instead of using the Fetch API, you can utilize the `convertJsonToXCResponse` method by passing the JSON response:

```ts
const xcResponse = XenoCanto.convertJsonToXCResponse(json);
```

## Limitation

Due to the API limitation, only English queries are supported, and the query should based on scientific or common names. You may refer to the [IOC World Bird List - Multilingual Version](https://www.worldbirdnames.org/new/ioc-lists/master-list-2/) for looking up and mapping the corresponding names.
Expand Down

0 comments on commit 7749441

Please sign in to comment.