Skip to content

feat(linkedin): add connections command#2083

Merged
jackwener merged 2 commits into
mainfrom
feat/linkedin-connections
Jul 11, 2026
Merged

feat(linkedin): add connections command#2083
jackwener merged 2 commits into
mainfrom
feat/linkedin-connections

Conversation

@jackwener

Copy link
Copy Markdown
Owner

What

Adds opencli linkedin connections — lists your first-degree LinkedIn connections (name, headline/occupation, public id, connected-at timestamp, profile URL). This was the main gap: the adapter had connect / sent-invitations (write/CRM) but no way to list your own network.

opencli linkedin connections --limit 20
Column Meaning
rank / name / occupation / public_id / connected_at / url connection identity + when you connected + profile link

How

  • Uses the voyager /voyager/api/relationships/connections REST endpoint via the existing shared JSESSIONID csrf-token + x-restli-protocol-version: 2.0.0 fetch pattern (same as inbox / people-search).
  • Paginates start/count up to --limit (max 500).
  • Typed errors: AuthRequiredError (missing session / 401 / 403), CommandExecutionError (malformed payload or element without miniProfile), EmptyResultError (no connections).

Verification

Live-verified end-to-end against a logged-in account — returns real connections with occupation and linkedin.com/in/<public_id> URLs.

  • 7 new tests (mapping, auth/empty/limit edges)
  • npm test549 files, 5959 passed
  • check:typed-error-lint new=0, check:silent-column-drop new=0

Explored, deferred

While probing I confirmed wvmpCards (profile-view counts, not a viewer list) and me (already whoami); received-invitations / notifications are now GraphQL DASH endpoints (queryId-based) rather than clean REST, so they warrant a dedicated follow-up rather than a fragile parser here.

Adds `opencli linkedin connections` — lists your first-degree LinkedIn
connections (name, headline/occupation, public id, connected-at, profile URL)
via the voyager `/voyager/api/relationships/connections` REST endpoint.

- Reuses the shared JSESSIONID csrf-token + x-restli-protocol-version voyager
  fetch pattern; paginates start/count up to --limit (max 500).
- Typed errors: AuthRequiredError (missing session / 401 / 403),
  CommandExecutionError (malformed payload / missing miniProfile),
  EmptyResultError (no connections).

Live-verified end-to-end against a logged-in account (real connections with
occupation + profile URLs). 7 new tests; full suite 5959 passed; audits new=0.
@jackwener jackwener merged commit ce9151f into main Jul 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant