Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
terminalone
Advanced tools
Node implementation of a T1 API Library. Uses Bluebird for fast, simple callback handling via promises.
npm install terminalone
Checkout, then npm install .
var t1 = require('terminalone');
var config = {
'user': t1_username,
'password': t1_user_password,
'api_key': application_mashery_key
};
Retrieve, edit and save a single entity
var connection = new t1.T1Connection(config);
var agencyPromise = new t1.Entity('agency')
.get(1234, connection)
.then(function(agency) {this.agency = agency});
agency.name = 'new name';
agency.save(conn).done(console.log('saved'));
Returns a generator to entities
var userParams = {
'page_limit':10
};
t1.EntityList.get('campaigns', connection, userParams).then(function(list) {this.pg1 = list});
t1.EntityList.getNextPage(pg1, conn).then(function(list) {this.pg2 = list});
for (var entity of pg1.entities) {console.log(entity)}
It's possible to include related entities by including in a 'with' property in userParams.
var userParams = {
'page_limit':10
'with':['strategies']
};
t1.EntityList.get('campaigns', connection, userParams).then(function(list) {this.pg1 = list});
t1.EntityList.getNextPage(pg1, connection).then(function(list) {this.pg2 = list});
for (var entity of pg1.entities) {console.log(entity)}
To get a strategy's targeting segments:
var targetingSegmentsPromise = new t1.StrategyTargetSegments()
.get(strategyId, connection)
.then(function(targetingSegments) {this.targetingSegments = targetingSegments});
To edit strategy targeting segments:
targetingSegments.include = [[1, 'OR']];
targetingSegments.exclude = [[119, 'OR']];
targetingSegments.include_op = 'OR';
targetingSegments.exclude_op = 'OR';
targetingSegments.save(connection).done(console.log('saved'));
To get a strategy's targeting values:
var targetValuesPromise = new t1.StrategyTargetValues()
.get(strategyId, connection)
.then(function(targetValues) {this.targetValues = targetValues});
To edit strategy targeting segments:
targetValues.include = [[1, 'OR']];
targetValues.addTargetValues('REGN', 'INCLUDE', 'OR', [23, 251]);
targetValues.save(connection).done(console.log('saved'));
=======
To get a strategy's audience segments:
var audienceSegmentsPromise = new t1.StrategyAudienceegments()
.get(strategyId, connection)
.then(function(audienceSegments) {this.targetingSegments = targetingSegments});
To edit strategy audience segments:
audienceSegments.include = [1405158];
audienceSegments.exclude = [1405158];
targetingSegments.include_op = 'OR';
targetingSegments.exclude_op = 'OR';
targetingSegments.save(connection).done(console.log('saved'));
FAQs
Connection Module for T1 API written in node.js
The npm package terminalone receives a total of 0 weekly downloads. As such, terminalone popularity was classified as not popular.
We found that terminalone 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.