-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linkedin Session #396
Comments
I've also checked the code but couldn't figure out how to fetch the previous work experience from a profile. Is it possible? |
any update? |
const client = new Client();
await client.login.userPass({ username, password });
const profile = await client.profile.getOwnProfile();
const result: any = await client.request.get(
`https://www.linkedin.com/voyager/api/identity/profiles/${profile?.entityUrn.split(':')[3]}/profileView`
);
const aggregateResults = result?.included?.reduce(
(acc: Record<string, any[]>, item: any) => {
if (item.$type == 'com.linkedin.voyager.identity.profile.Position') {
acc.positions.push(item);
} else if (item.$type == 'com.linkedin.voyager.identity.profile.Certification') {
acc.certifications.push(item);
} else if (item.$type == 'com.linkedin.voyager.entities.shared.MiniSchool') {
acc.education.push(item);
}
return acc;
},
{ certifications: [], positions: [], education: [] }
); Not perfect but could give that a go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
The text was updated successfully, but these errors were encountered: