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
Copy file name to clipboardExpand all lines: README.md
+8-70Lines changed: 8 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,7 @@ Developer-friendly & type-safe TypeScript SDK for the [Kombo Unified API](https:
25
25
*[@kombo-api/sdk](#kombo-apisdk)
26
26
*[SDK Installation](#sdk-installation)
27
27
*[SDK Example Usage](#sdk-example-usage)
28
-
*[Global Parameters](#global-parameters)
29
-
*[Server Selection](#server-selection)
28
+
*[Region Selection](#region-selection)
30
29
*[Available Resources and Operations](#available-resources-and-operations)
31
30
*[Pagination](#pagination)
32
31
*[Error Handling](#error-handling)
@@ -75,11 +74,8 @@ yarn add @kombo-api/sdk
75
74
> CommonJS, use `await import("@kombo-api/sdk")` to import and use this package.
76
75
<!-- End SDK Installation [installation] -->
77
76
78
-
<!-- Start SDK Example Usage [usage] -->
79
77
## SDK Example Usage
80
78
81
-
### Example
82
-
83
79
```typescript
84
80
import { Kombo } from"@kombo-api/sdk";
85
81
@@ -94,61 +90,34 @@ async function run() {
94
90
}
95
91
96
92
run();
97
-
98
93
```
99
-
<!-- End SDK Example Usage [usage] -->
100
-
101
-
<!-- Start Global Parameters [global-parameters] -->
102
-
## Global Parameters
103
-
104
-
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
105
-
106
-
For example, you can set `integration_id` to `"workday:HWUTwvyx2wLoSUHphiWVrp28"` at SDK initialization and then you do not have to pass the same value on calls to operations like `deleteIntegration`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
| integration_id | string | ID of the integration you want to interact with. |
116
-
117
-
### Example
97
+
The majority of Kombo API endpoints are for interacting with a single "integration" (i.e., a single connection to one your customers' systems). For using these, make sure to specify the `integration_id` parameter when initializing the SDK:
<!-- End Global Parameters [global-parameters] -->
140
-
141
-
<!-- Start Server Selection [server] -->
142
-
## Server Selection
143
115
144
-
### Select Server by Name
116
+
##Region Selection
145
117
146
-
You can override the default server globally by passing a server name to the `server: keyof typeof ServerList` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
118
+
The Kombo platform is available in two regions: Europe and United States.
|`eu`|`https://api.kombo.dev/v1`| Kombo API Server |
151
-
|`us`|`https://api.us.kombo.dev/v1`| Kombo API Server |
120
+
By default, the SDK will use the EU region. If you're using the US region (hosted under `api.us.kombo.dev`), make sure to specify the `server` parameter when initializing the SDK.
152
121
153
122
#### Example
154
123
@@ -159,38 +128,7 @@ const kombo = new Kombo({
159
128
server: "us",
160
129
api_key: "<YOUR_BEARER_TOKEN_HERE>",
161
130
});
162
-
163
-
asyncfunction run() {
164
-
const result =awaitkombo.general.checkApiKey();
165
-
166
-
console.log(result);
167
-
}
168
-
169
-
run();
170
-
171
-
```
172
-
173
-
### Override Server URL Per-Client
174
-
175
-
The default server can also be overridden globally by passing a URL to the `server_url: string` optional parameter when initializing the SDK client instance. For example:
176
-
```typescript
177
-
import { Kombo } from"@kombo-api/sdk";
178
-
179
-
const kombo =newKombo({
180
-
server_url: "https://api.kombo.dev/v1",
181
-
api_key: "<YOUR_BEARER_TOKEN_HERE>",
182
-
});
183
-
184
-
asyncfunction run() {
185
-
const result =awaitkombo.general.checkApiKey();
186
-
187
-
console.log(result);
188
-
}
189
-
190
-
run();
191
-
192
131
```
193
-
<!-- End Server Selection [server] -->
194
132
195
133
<!-- Start Available Resources and Operations [operations] -->
0 commit comments