@roytran91/bb-gg-ads-core
Version:
bb-gg-ads-core
31 lines (22 loc) • 880 B
Markdown
```bash
$ yarn add @roytran91/bb-gg-ads-core
```
You can find the reference [full documentation here](https://opteo.com/dev/google-ads-api).
```javascript
const Google = require('@roytran91/bb-gg-ads-core')
// 1. Create a new client with your credentials
const client = new Google({
client_id: '<CLIENT_ID>',
client_secret: '<CLIENT_SECRET>',
developer_token: '<DEVELOPER_TOKEN>',
refresh_token: '<REFRESH_TOKEN>',
[] : '<CUSTOMER_ACCOUNT_ID>', // must specify if want to get the campaigns, metrics..
[] : '<LOGIN_CUSTOMER_ID>' // Optionally provide a login-customer-id
})
//get all ads account with account have the fresh_token
client.getAdAccounts();
//Get history change of account
const history = await g2.getHistory(['860011646'], '2019-07-18', '2019-07-26')