Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-linkedin-v2

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-linkedin-v2 - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

6

lib/LinkedInAPI.js

@@ -37,8 +37,10 @@ 'use strict';

*
* @param fields
* @param access_token
* @returns {Promise<Object>}
*/
async getCurrentMemberProfile(access_token) {
async getCurrentMemberProfile(fields, access_token) {
if (!access_token) throw new Error('Access code cannot be empty');
const url = `${this.url}/me`;
if (!Array.isArray(fields)) throw new Error('Parameter "fields" must be an array');
const url = `${this.url}/me?projection=(${fields.join(',')})`;
return this.invoke('GET', url, undefined, undefined, { withAuth: true, access_token });

@@ -45,0 +47,0 @@ }

{
"name": "node-linkedin-v2",
"version": "0.0.5",
"version": "0.0.6",
"description": "Client for LinkedIn API v2",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,3 +15,3 @@ 'use strict';

it('should call getCurrentMemberProfile() correctly', (done) => {
linkedInAPI.getCurrentMemberProfile('access_token')
linkedInAPI.getCurrentMemberProfile(['id', 'firstName', 'lastName'], 'access_token')
.then(response => {

@@ -18,0 +18,0 @@ console.log(response);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc