added toObj method

This commit is contained in:
2024-05-14 09:45:16 -07:00
parent 9a34197fc8
commit 4db3a17f48
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -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<JSON[] | LinkedInProfile[]>}
+1 -1
View File
@@ -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"