This is a fork of https://github.com/ShinyAds/node-google-dfp
Initialize the DFP Instance.
var Dfp = require('node-google-dfp');
var dfpUser = new DfpClass.User(NETWORK_CODE, APP_NAME, VERSION);
Next, setup your client settings and your user's OAUTH token information.
dfpUser.setSettings({
client_id : "YOUR CLIENT ID",
client_secret : "YOUR CLIENT SECRET",
refresh_token : "A REFRESH TOKEN",
redirect_url : "YOUR OAUTH REDIRECT URL"
});
You can instance any of DFP's API Services; https://developers.google.com/doubleclick-publishers/docs/start
dfpUser.getService('LineItemService', function (lineItemService) {
var statement = new DfpClass.Statement('WHERE id = 103207340');
lineItemService.getLineItemsByStatement(statement, function (err, results) {
console.log(results);
});
});
- OAuth Support for more than just Refresh Token
- No unit tests
Follow Github's recommended workflow for contributing to this project.
- Fork it
- Create your feature branch (
git checkout -b your-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin your-new-feature
) - Create new Pull Request