
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Node.JS library for communicating with Turistforeningen's API.
Table of Contents
Require Node.JS version >= 0.10
.
npm install dnt-api --save
var DNT = require('dnt-api');
var dnt = new DNT('My Application/1.0', 'myApiKey');
object
query, function
cb)The getMemberFor()
method is used to get details for a given member from the
membership register.
The query
parameter can at the moment have either one, or both, of the following
properties:
sherpa_id
- which is the local user id for Sherpa 3.medlemsnummer
which is the membership number for a given membership.The callback function to this requests takes tree parameters:
Error
err - this is an error if the HTTP request itself failed.number
statusCode - HTTP status code returned from the API.object
memberData - data returned from the API.dnt.getMemberFor({ sherpa_id: 1234 }, function(err, statusCode, memberData) {
if (err) { throw err }
if (statusCode === 200) {
console.log('Member is ' + memberData.fornavn);
} else {
console.error('Request failed! HTTP status code returned is ' + statusCode);
console.error(memberData.errors);
}
});
object
query, function
cb)The getAssociationsFor()
method is used to get associations (NO foreninger)
for a given member from the membership register.
The query
parameter can at the moment have either one, or both, of the following
properties:
bruker_sherpa_id
- which is the local user id for Sherpa 3.bruker_medlemsnummer
which is the membership number for a given membership.The callback function to this requests takes tree parameters:
Error
err - this is an error if the HTTP request itself failed.number
statusCode - HTTP status code returned from the API.Array
associations - data returned from the API.dnt.getAssociationsFor({ bruker_sherpa_id: 1234 }, function(err, statusCode, associations) {
if (err) { throw err }
if (statusCode === 200) {
for (var i = 0; i < associations.length; i++) {
console.log('Member is associated with ' + associations[i].navn);
}
} else {
console.error('Request failed! HTTP status code returned is ' + statusCode);
console.error(associations.errors);
}
});
FAQs
Node.JS library for communicating with Turistforeningen's API
The npm package dnt-api receives a total of 3 weekly downloads. As such, dnt-api popularity was classified as not popular.
We found that dnt-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.