Skip to content

Commit fdf57fa

Browse files
committed
New sdk version adaptation
1 parent dcd1e11 commit fdf57fa

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linkedapi/linkedin-cli",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "AI-agent-friendly CLI for controlling LinkedIn accounts and retrieving real-time data.",
55
"author": "Linked API",
66
"license": "MIT",
@@ -43,7 +43,7 @@
4343
"ai-agent"
4444
],
4545
"dependencies": {
46-
"@linkedapi/node": "^1.2.18",
46+
"@linkedapi/node": "^1.2.19",
4747
"@oclif/core": "^4.2.10"
4848
},
4949
"devDependencies": {

src/core/client/build-client.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
import LinkedApi, { buildLinkedApiHttpClient } from '@linkedapi/node';
1+
import LinkedApi from '@linkedapi/node';
22

33
interface TClientTokens {
44
linkedApiToken: string;
55
identificationToken: string;
66
}
77

8-
const DEFAULT_API_BASE_URL = 'https://api.linkedapi.io' as const;
9-
108
export function buildClient(tokens: TClientTokens): LinkedApi {
119
const overrideBaseUrl = process.env.LINKED_API_BASE_URL?.trim();
12-
const baseUrl =
13-
overrideBaseUrl && overrideBaseUrl.length > 0 ? overrideBaseUrl : DEFAULT_API_BASE_URL;
14-
const httpClient = buildLinkedApiHttpClient({ ...tokens, client: 'cli' }, 'cli', baseUrl);
15-
return new LinkedApi(httpClient);
10+
const baseUrl = overrideBaseUrl && overrideBaseUrl.length > 0 ? overrideBaseUrl : undefined;
11+
return new LinkedApi({ ...tokens, client: 'cli', baseUrl });
1612
}

0 commit comments

Comments
 (0)