From 99e9f4e3e3f28cdffe6b25f3b8d9dff2c468d42b Mon Sep 17 00:00:00 2001 From: ION606 Date: Thu, 9 May 2024 09:39:55 -0700 Subject: [PATCH] renamed function --- classes/API.js | 2 ++ classes/Company.js | 2 +- src/types/index.d.ts | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/API.js b/classes/API.js index 087e94c..6d2def1 100644 --- a/classes/API.js +++ b/classes/API.js @@ -192,6 +192,8 @@ export default class linkedInAPIClass { * @param {Array?} numEmp * @param {Number?} [start=0] * @param {boolean?} [castToClass=true] whether the function should return a list of Company classes or just raw JSON + * @param {boolean} [excludeGeneric=false] + * @returns {Promise<[SocialActivityCounts | Group | Company | GenericEntity]>} */ async searchCompanies(keyword, numEmp, start = 0, castToClass = true, excludeGeneric = false) { let urlExt = `variables=(start:${start},origin:GLOBAL_SEARCH_HEADER,query:(keywords:${keyword},flagshipSearchIntent:SEARCH_SRP,queryParameters:List((key:resultType,value:List(COMPANIES))),includeFiltersInResponse:false))`; diff --git a/classes/Company.js b/classes/Company.js index 89e9744..3af2350 100644 --- a/classes/Company.js +++ b/classes/Company.js @@ -45,7 +45,7 @@ export class Company { * @param {string} name * @param {boolean} raw */ - getEmployees = (name, limit=1000, raw=false) => this.#APIRef.searchEmployees(name, limit, !raw, [this.urn]); + searchEmployees = (name, limit=1000, raw=false) => this.#APIRef.searchEmployees(name, limit, !raw, [this.urn]); async getInfo() { const toAdd = `q=universalName&universalName=${this.urn}`; diff --git a/src/types/index.d.ts b/src/types/index.d.ts index be44e1d..3aac53c 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -162,8 +162,8 @@ export default class linkedInAPIClass { * @param numEmp Array of numbers representing company sizes * @param start Pagination start * @param castToClass Whether to cast the result to Company classes or return raw JSON - * @param excludeGeneric Whether to exclude generic results - * @returns Promise resolving to either an array of Company or raw JSON + * @param excludeGeneric Whether to exclude the "generic" class + * @returns Promise resolving to either an array of SocialActivityCounts or Group or Company or GenericEntity */ searchCompanies(keyword: string, numEmp?: number[], start?: number, castToClass?: boolean, excludeGeneric?: boolean): Promise<[SocialActivityCounts | Group | Company | GenericEntity]>;