From 4db3a17f48f500accc82148d787cf74872ce6d17 Mon Sep 17 00:00:00 2001 From: ION606 Date: Tue, 14 May 2024 09:45:16 -0700 Subject: [PATCH] added toObj method --- classes/Company.js | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/classes/Company.js b/classes/Company.js index cea929d..25ed9d9 100644 --- a/classes/Company.js +++ b/classes/Company.js @@ -39,6 +39,16 @@ export class Company { return (raw) ? empAll : empAll.map(eRaw => new LinkedInProfile(eRaw, this.#APIRef)); } + toObj() { + return { + data: { + title: { text: this.name }, + entityUrn: this.urn, + navigationUrl: this.url, + trackingUrn: `urn:li:company:${this.entityNum}` + } + }; + } /** * @returns {Promise} diff --git a/package.json b/package.json index 7dc2c73..a9556ce 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "type": "module", "name": "linkedin-api-js", - "version": "1.0.0-14", + "version": "1.0.0-15", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"