UNPKG

@roytran91/bb-gg-ads-core

Version:
31 lines (22 loc) 880 B
## Installation ```bash $ yarn add @roytran91/bb-gg-ads-core ``` # Documentation You can find the reference [full documentation here](https://opteo.com/dev/google-ads-api). # Basic Example ```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] : '<CUSTOMER_ACCOUNT_ID>', // must specify if want to get the campaigns, metrics.. [login_customer_id] : '<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')