adnxs-api
v1.1.1
Published
Another AppNexus API
Downloads
17
Readme
adnxs-api
adnxs-api is an AppNexus client
Install
$ npm install adnxs-api --save
Examples
Authorization
const { Client } = require('adnxs-api');
const client = new Client();
client
.authorize('FFD', 'xxxxxxx')
.then(function(token){
//Do something funky..
console.log(token)
})
.catch(function(err){
console.log(err.stack)
});
Request all active campaigns
const { Client, endpoints } = require('adnxs-api');
const client = new Client();
client
.authorize('FFD', 'xxxxxxx') // optional
.then(function(token){
return client.get(endpoints.CAMPAIGN_SERVICE, {state: 'active'});
})
.then(function(resp){
console.log(resp)
})
.catch(function(err){
console.log(err.stack)
});