mirror of
https://github.com/ION606/linkedin-api.git
synced 2026-05-15 06:16:54 +00:00
bug fixes
This commit is contained in:
+2
-2
@@ -44,11 +44,11 @@ export class Company {
|
|||||||
/**
|
/**
|
||||||
* @returns {Promise<JSON[] | LinkedInProfile[]>}
|
* @returns {Promise<JSON[] | LinkedInProfile[]>}
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @param {boolean} raw
|
* @param {boolean} castToClass
|
||||||
* @param {number} limit
|
* @param {number} limit
|
||||||
* @note this function calls {@link linkedInAPIClass.searchEmployees}
|
* @note this function calls {@link linkedInAPIClass.searchEmployees}
|
||||||
*/
|
*/
|
||||||
searchEmployees = (name, limit = 1000, raw = false) => this.#APIRef.searchEmployees(name, limit, !raw, [this.entityNum]);
|
searchEmployees = (name, limit = 1000, castToClass = true) => this.#APIRef.searchEmployees(name, limit, castToClass, [this.entityNum]);
|
||||||
|
|
||||||
async getInfo() {
|
async getInfo() {
|
||||||
const toAdd = `q=universalName&universalName=${this.urn}`;
|
const toAdd = `q=universalName&universalName=${this.urn}`;
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "linkedin-api-js",
|
"name": "linkedin-api-js",
|
||||||
"version": "1.0.0-9",
|
"version": "1.0.0-10",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import fs from 'fs';
|
|||||||
const o = JSON.parse(fs.readFileSync('config.json'));
|
const o = JSON.parse(fs.readFileSync('config.json'));
|
||||||
await LAPI.login(o.email, o.password);
|
await LAPI.login(o.email, o.password);
|
||||||
|
|
||||||
const c = await LAPI.searchCompanies('microsoft', [10, 500, 5000], 20, 0, true, true);
|
const c = await LAPI.searchCompanies('microsoft', [5001], 20, 0, true, true);
|
||||||
console.log(c);
|
console.log(c);
|
||||||
|
|
||||||
const managers = await c.find(o => (o.name === 'Microsoft')).searchEmployees('manager', 5);
|
const managers = await c.find(o => (o.name === 'Microsoft')).searchEmployees('manager', 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user