Skip to content

Commit c0ffdce

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#13)
1 parent daf4b28 commit c0ffdce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class Browserbase extends Core.APIClient {
8181
* API Client for interfacing with the Browserbase API.
8282
*
8383
* @param {string | undefined} [opts.apiKey=process.env['BROWSERBASE_API_KEY'] ?? undefined]
84-
* @param {string} [opts.baseURL=process.env['BROWSERBASE_BASE_URL'] ?? https://www.browserbase.com] - Override the default base URL for the API.
84+
* @param {string} [opts.baseURL=process.env['BROWSERBASE_BASE_URL'] ?? https://api.dev.browserbase.com] - Override the default base URL for the API.
8585
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
8686
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
8787
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -103,7 +103,7 @@ export class Browserbase extends Core.APIClient {
103103
const options: ClientOptions = {
104104
apiKey,
105105
...opts,
106-
baseURL: baseURL || `https://www.browserbase.com`,
106+
baseURL: baseURL || `https://api.dev.browserbase.com`,
107107
};
108108

109109
super({

tests/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ describe('instantiate client', () => {
151151
test('empty env variable', () => {
152152
process.env['BROWSERBASE_BASE_URL'] = ''; // empty
153153
const client = new Browserbase({ apiKey: 'My API Key' });
154-
expect(client.baseURL).toEqual('https://www.browserbase.com');
154+
expect(client.baseURL).toEqual('https://api.dev.browserbase.com');
155155
});
156156

157157
test('blank env variable', () => {
158158
process.env['BROWSERBASE_BASE_URL'] = ' '; // blank
159159
const client = new Browserbase({ apiKey: 'My API Key' });
160-
expect(client.baseURL).toEqual('https://www.browserbase.com');
160+
expect(client.baseURL).toEqual('https://api.dev.browserbase.com');
161161
});
162162
});
163163

0 commit comments

Comments
 (0)