You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library provides convenient access to the Zeroentropy REST API from server-side TypeScript or JavaScript.
5
+
This library provides convenient access to the ZeroEntropy REST API from server-side TypeScript or JavaScript.
6
6
7
7
The REST API documentation can be found on [docs.zeroentropy.dev](https://docs.zeroentropy.dev/api-reference). The full API of this library can be found in [api.md](api.md).
8
8
@@ -18,9 +18,9 @@ The full API of this library can be found in [api.md](api.md).
18
18
19
19
<!-- prettier-ignore -->
20
20
```js
21
-
importZeroentropyfrom'zeroentropy';
21
+
importZeroEntropyfrom'zeroentropy';
22
22
23
-
constclient=newZeroentropy({
23
+
constclient=newZeroEntropy({
24
24
apiKey:process.env['ZEROENTROPY_API_KEY'], // This is the default and can be omitted
25
25
});
26
26
@@ -43,14 +43,14 @@ This library includes TypeScript definitions for all request params and response
43
43
44
44
<!-- prettier-ignore -->
45
45
```ts
46
-
importZeroentropyfrom'zeroentropy';
46
+
importZeroEntropyfrom'zeroentropy';
47
47
48
-
const client =newZeroentropy({
48
+
const client =newZeroEntropy({
49
49
apiKey: process.env['ZEROENTROPY_API_KEY'], // This is the default and can be omitted
Copy file name to clipboardExpand all lines: src/core.ts
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
import{VERSION}from'./version';
2
2
import{
3
-
ZeroentropyError,
3
+
ZeroEntropyError,
4
4
APIError,
5
5
APIConnectionError,
6
6
APIConnectionTimeoutError,
@@ -504,7 +504,7 @@ export abstract class APIClient {
504
504
if(value===null){
505
505
return`${encodeURIComponent(key)}=`;
506
506
}
507
-
thrownewZeroentropyError(
507
+
thrownewZeroEntropyError(
508
508
`Cannot stringify type ${typeofvalue}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
* @param {string} [opts.baseURL=process.env['ZEROENTROPY_BASE_URL'] ?? https://api.zeroentropy.dev/v1] - Override the default base URL for the API.
@@ -131,8 +131,8 @@ export class Zeroentropy extends Core.APIClient {
131
131
...opts
132
132
}: ClientOptions={}){
133
133
if(apiKey===undefined){
134
-
thrownewErrors.ZeroentropyError(
135
-
"The ZEROENTROPY_API_KEY environment variable is missing or empty; either provide it, or instantiate the Zeroentropy client with an apiKey option, like new Zeroentropy({ apiKey: 'My API Key' }).",
134
+
thrownewErrors.ZeroEntropyError(
135
+
"The ZEROENTROPY_API_KEY environment variable is missing or empty; either provide it, or instantiate the ZeroEntropy client with an apiKey option, like new ZeroEntropy({ apiKey: 'My API Key' }).",
136
136
);
137
137
}
138
138
@@ -176,10 +176,10 @@ export class Zeroentropy extends Core.APIClient {
0 commit comments