Skip to content

Commit bcc8f3c

Browse files
feat(api): update API URL to api.grid.is (#38)
1 parent b3240ac commit bcc8f3c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class Grid {
133133
* API Client for interfacing with the Grid API.
134134
*
135135
* @param {string | undefined} [opts.apiKey=process.env['GRID_API_TOKEN'] ?? undefined]
136-
* @param {string} [opts.baseURL=process.env['GRID_BASE_URL'] ?? https://api-alpha.grid.is] - Override the default base URL for the API.
136+
* @param {string} [opts.baseURL=process.env['GRID_BASE_URL'] ?? https://api.grid.is] - Override the default base URL for the API.
137137
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
138138
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
139139
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -155,7 +155,7 @@ export class Grid {
155155
const options: ClientOptions = {
156156
apiKey,
157157
...opts,
158-
baseURL: baseURL || `https://api-alpha.grid.is`,
158+
baseURL: baseURL || `https://api.grid.is`,
159159
};
160160

161161
this.baseURL = options.baseURL!;

tests/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,13 @@ describe('instantiate client', () => {
298298
test('empty env variable', () => {
299299
process.env['GRID_BASE_URL'] = ''; // empty
300300
const client = new Grid({ apiKey: 'My API Key' });
301-
expect(client.baseURL).toEqual('https://api-alpha.grid.is');
301+
expect(client.baseURL).toEqual('https://api.grid.is');
302302
});
303303

304304
test('blank env variable', () => {
305305
process.env['GRID_BASE_URL'] = ' '; // blank
306306
const client = new Grid({ apiKey: 'My API Key' });
307-
expect(client.baseURL).toEqual('https://api-alpha.grid.is');
307+
expect(client.baseURL).toEqual('https://api.grid.is');
308308
});
309309
});
310310

0 commit comments

Comments
 (0)