Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shiqiyue-linkedin-private-api

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shiqiyue-linkedin-private-api - npm Package Compare versions

Comparing version 1.1.15 to 1.1.16

1

dist/src/repositories/search.repository.d.ts

@@ -53,4 +53,5 @@ import { Client } from '../core/client';

private handleProfileLazy;
private handleProfileLazy2;
private fetchCompanies;
private fetchJobs;
}

@@ -79,7 +79,7 @@ "use strict";

const urn = profilesKey.replace("urn:li:fs_miniProfile:", "");
const lazyId = `urn:li:fsd_lazyLoadedActions:(urn:li:fsd_profileActions:(${urn},SEARCH,EMPTY_CONTEXT_ENTITY_URN),PEOPLE,SEARCH_SRP`;
const lazyId = `urn:li:fsd_lazyLoadedActions:(urn:li:fsd_profileActions:(${urn},SEARCH,EMPTY_CONTEXT_ENTITY_URN),PEOPLE,SEARCH_SRP)`;
lazyIds.push(lazyId);
}
const lazys = await this.client.request.search.lazyLoadAction({ ids: lazyIds });
console.log(lazys);
this.handleProfileLazy2({ profiles, lazys });
return searchHits.map(searchHit => ({

@@ -186,2 +186,68 @@ ...searchHit,

}
handleProfileLazy2({ profiles, lazys }) {
const lazyRecords = [];
const getLazyByUrn = function (urn) {
for (const lazyRecord of lazyRecords) {
if (lazyRecord.urn === urn) {
return lazyRecord;
}
}
return null;
};
const getLazyByLazyUrn = function (urn) {
for (const lazyRecord of lazyRecords) {
if (lazyRecord.lazyUrn === urn) {
return lazyRecord;
}
}
return null;
};
if (lazys) {
for (const resultsKey in lazys.data.results) {
const lazyRecord = {
lazyUrn: undefined,
urn: undefined
};
lazyRecord.lazyUrn = lazys.data.results[resultsKey];
lazyRecord.urn = lazyRecord.lazyUrn.replace("urn:li:fsd_lazyLoadedActions:(urn:li:fsd_profileActions:(", "").replace(",SEARCH,EMPTY_CONTEXT_ENTITY_URN),PEOPLE,SEARCH_SRP)", "");
lazyRecords.push(lazyRecord);
}
for (const e of lazys.included) {
if (e.$type === "com.linkedin.voyager.dash.feed.FollowingState") {
const lazyRecord = getLazyByUrn(e.entityUrn.replace("urn:li:fsd_followingState:urn:li:fsd_profile:", ""));
if (lazyRecord) {
lazyRecord.followingState = e;
}
}
if (e.$type === "com.linkedin.voyager.dash.identity.profile.Profile") {
const lazyRecord = getLazyByUrn(e.entityUrn.replace("urn:li:fsd_profile:", ""));
if (lazyRecord) {
lazyRecord.profile = e;
}
}
if (e.$type === "com.linkedin.voyager.dash.relationships.MemberRelationship") {
const lazyRecord = getLazyByUrn(e.entityUrn.replace("urn:li:fsd_memberRelationship:", ""));
if (lazyRecord) {
lazyRecord.memberRelationship = e;
}
}
if (e.$type === "com.linkedin.voyager.dash.relationships.invitation.Invitation") {
const lazyRecord = getLazyByUrn(e.inviteeMember.replace("urn:li:fsd_profile:", ""));
if (lazyRecord) {
lazyRecord.invitation = e;
}
}
if (e.$type === "com.linkedin.voyager.dash.search.LazyLoadedActions") {
const lazyRecord = getLazyByLazyUrn(e.entityUrn);
if (lazyRecord) {
lazyRecord.actions = e;
}
}
}
}
for (const profileId in profiles) {
const urn = profileId.replace("urn:li:fs_miniProfile:", "");
profiles[profileId].lazy = getLazyByUrn(urn);
}
}
async fetchCompanies({ skip = 0, limit = 10, keywords, }) {

@@ -188,0 +254,0 @@ const response = await this.client.request.search.searchBlended({

2

package.json
{
"name": "shiqiyue-linkedin-private-api",
"version": "1.1.15",
"version": "1.1.16",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc