New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wireapp/api-client

Package Overview
Dependencies
Maintainers
6
Versions
1434
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wireapp/api-client - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

15

dist/commonjs/user/UserAPI.js

@@ -28,4 +28,19 @@ "use strict";

};
UserAPI.prototype.getUsers = function (parameters) {
var config = {
method: 'get',
url: UserAPI.URL.USERS
};
if (parameters.handles) {
config.url += "?handles=" + parameters.handles.join(',');
}
if (parameters.ids) {
config.url += "?ids=" + parameters.ids.join(',');
}
return this.client.sendJSONRequest(config).then(function (response) {
return response.data;
});
};
return UserAPI;
}());
exports.default = UserAPI;

8

dist/index.js

@@ -27,7 +27,11 @@ const argv = require('optimist')

.then((accessTokenData) => {
console.log('Login successful', accessTokenData);
console.log(`Login successful. AccessToken expires in "${accessTokenData.expires_in}"s.`);
return client.user.api.getSelf();
})
.then((userData) => {
console.log('Got self user', userData.name);
console.log(`Got self user with name "${userData.name}".`);
return client.user.api.getUsers({handles: ['webappbot']})
})
.then((userData) => {
console.log(`Found user with name "${userData[0].name}" by handle "${userData[0].handle}".`);
return client.listen();

@@ -34,0 +38,0 @@ })

@@ -44,3 +44,3 @@ {

},
"version": "0.0.8"
"version": "0.0.9"
}

@@ -28,2 +28,21 @@ import {AxiosRequestConfig, AxiosResponse} from 'axios';

}
public getUsers(parameters: { handles?: string[], ids?: string[] }): Promise<UserData[]> {
const config: AxiosRequestConfig = {
method: 'get',
url: UserAPI.URL.USERS
};
if (parameters.handles) {
config.url += `?handles=${parameters.handles.join(',')}`;
}
if (parameters.ids) {
config.url += `?ids=${parameters.ids.join(',')}`;
}
return this.client.sendJSONRequest(config).then((response: AxiosResponse) => {
return response.data;
});
}
}
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