feat(linkedin): add connections command#2083
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 hadconnect/sent-invitations(write/CRM) but no way to list your own network.How
/voyager/api/relationships/connectionsREST endpoint via the existing shared JSESSIONIDcsrf-token+x-restli-protocol-version: 2.0.0fetch pattern (same asinbox/people-search).start/countup to--limit(max 500).AuthRequiredError(missing session / 401 / 403),CommandExecutionError(malformed payload or element withoutminiProfile),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.npm test→ 549 files, 5959 passedcheck:typed-error-lintnew=0,check:silent-column-dropnew=0Explored, deferred
While probing I confirmed
wvmpCards(profile-view counts, not a viewer list) andme(alreadywhoami); 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.