renamed function

This commit is contained in:
2024-05-09 09:39:55 -07:00
parent c94224a6c9
commit 99e9f4e3e3
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -192,6 +192,8 @@ export default class linkedInAPIClass {
* @param {Array<Number>?} numEmp * @param {Array<Number>?} numEmp
* @param {Number?} [start=0] * @param {Number?} [start=0]
* @param {boolean?} [castToClass=true] whether the function should return a list of Company classes or just raw JSON * @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) { 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))`; let urlExt = `variables=(start:${start},origin:GLOBAL_SEARCH_HEADER,query:(keywords:${keyword},flagshipSearchIntent:SEARCH_SRP,queryParameters:List((key:resultType,value:List(COMPANIES))),includeFiltersInResponse:false))`;
+1 -1
View File
@@ -45,7 +45,7 @@ export class Company {
* @param {string} name * @param {string} name
* @param {boolean} raw * @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() { async getInfo() {
const toAdd = `q=universalName&universalName=${this.urn}`; const toAdd = `q=universalName&universalName=${this.urn}`;
+2 -2
View File
@@ -162,8 +162,8 @@ export default class linkedInAPIClass {
* @param numEmp Array of numbers representing company sizes * @param numEmp Array of numbers representing company sizes
* @param start Pagination start * @param start Pagination start
* @param castToClass Whether to cast the result to Company classes or return raw JSON * @param castToClass Whether to cast the result to Company classes or return raw JSON
* @param excludeGeneric Whether to exclude generic results * @param excludeGeneric Whether to exclude the "generic" class
* @returns Promise resolving to either an array of Company or raw JSON * @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]>; searchCompanies(keyword: string, numEmp?: number[], start?: number, castToClass?: boolean, excludeGeneric?: boolean): Promise<[SocialActivityCounts | Group | Company | GenericEntity]>;