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

@people.io/ppl-api-client-js

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@people.io/ppl-api-client-js - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

pippo.js

2

index.js

@@ -17,3 +17,3 @@ const client = require('./lib/httpClient');

async function getUserIdToken({ token, apiKey, clientId } = {} ) {
return client.execute('post', 'idToken', undefined, { token, apiKey, clientId });
return client.execute('get', 'idToken', undefined, { token, apiKey, clientId });
}

@@ -20,0 +20,0 @@

@@ -54,3 +54,3 @@ const axios = require('axios');

'X-Api-Key': `${params.apiKey}`,
'X-APP-CLIENT-ID': `${params.clientId}`,
'X-App-Client-Id': `${params.clientId}`,
}

@@ -91,2 +91,14 @@ };

// yes this is a bit of a hack: we need it to trap some
// possible weird output due to wrong configs.
function checkDataStatusCode(data = {}) {
const status = data.statusCode || data.status || 0;
if (status.toString().match((/[45]0[0-9]/))) {
throw data;
}
return data;
}
function execute(method = 'get', endpointName = 'none', data = {}, options = {}) {

@@ -96,3 +108,3 @@ const params = getCallParams(endpointName, options);

return axios(request);
return axios(request).then(({data}) => checkDataStatusCode(data));
}

@@ -99,0 +111,0 @@

{
"name": "@people.io/ppl-api-client-js",
"version": "1.1.0",
"version": "1.1.1",
"description": "Simple client for people.io api",

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

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