Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 18ec7db

Browse files
authored
fix: Merge pull request #23 from seamapi/configurable-seam-api-url
2 parents 146a771 + 3459278 commit 18ec7db

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

docs/classes/default.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737

3838
#### Parameters
3939

40-
| Name | Type | Default value |
41-
| :------ | :------ | :------ |
42-
| `apiKey?` | `string` | `undefined` |
43-
| `endpoint` | `string` | `"https://connect.getseam.com"` |
40+
| Name | Type |
41+
| :------ | :------ |
42+
| `apiKey?` | `string` |
43+
| `endpoint` | `string` |
4444

4545
#### Overrides
4646

@@ -239,4 +239,4 @@ Routes.makeRequest
239239

240240
#### Defined in
241241

242-
[src/index.ts:30](https://github.com/seamapi/seamapi-javascript/blob/main/src/index.ts#L30)
242+
[src/index.ts:33](https://github.com/seamapi/seamapi-javascript/blob/main/src/index.ts#L33)

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import { ErroredAPIResponse, SuccessfulAPIResponse } from "./types/globals"
66
class Seam extends Routes {
77
private client: AxiosInstance
88

9-
constructor(apiKey?: string, endpoint = "https://connect.getseam.com") {
9+
constructor(
10+
apiKey?: string,
11+
endpoint = process?.env?.SEAM_API_URL || "https://connect.getseam.com"
12+
) {
1013
super()
1114

1215
if (!apiKey) {

0 commit comments

Comments
 (0)