2024-05-10 13:27:48 -07:00
|
|
|
import LinkedInAPIClass from "../index.js";
|
|
|
|
|
import fs from 'fs';
|
|
|
|
|
|
2024-05-14 08:08:24 -07:00
|
|
|
const LAPI = new LinkedInAPIClass(true);
|
2024-05-10 13:27:48 -07:00
|
|
|
|
2024-05-14 08:08:24 -07:00
|
|
|
const o = JSON.parse(fs.readFileSync('config.json'));
|
|
|
|
|
await LAPI.login(o.email, o.password);
|
2024-05-10 13:27:48 -07:00
|
|
|
|
2024-05-14 08:08:24 -07:00
|
|
|
async function smallTest() {
|
2024-05-13 15:21:06 -07:00
|
|
|
const c = (await LAPI.searchCompanies('microsoft', [5001], 20, 0, true, true)).find(o => (o.name === 'Microsoft'));
|
2024-05-10 13:50:31 -07:00
|
|
|
console.log(c);
|
2024-05-14 08:08:24 -07:00
|
|
|
|
|
|
|
|
const managers = await c.searchEmployees('manager', 20);
|
|
|
|
|
console.log(managers, managers.length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function largeTest() {
|
|
|
|
|
const c = (await LAPI.searchCompanies('marukai', null, 1, 0, true, true)).find(o => (o.name === 'Marukai Corporation U.S.A.'));
|
|
|
|
|
console.log(c);
|
|
|
|
|
|
|
|
|
|
console.log(await c.getEmployees());
|
|
|
|
|
|
2024-05-13 15:21:06 -07:00
|
|
|
const managers = await c.searchEmployees('manager');
|
2024-05-10 13:27:48 -07:00
|
|
|
console.log(managers, managers.length);
|
2024-05-14 08:08:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
largeTest();
|