diff --git a/package.json b/package.json index 240cb7d..cced55e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twitter-ads-api-analytics-debugger", - "version": "0.0.3", + "version": "0.0.4", "description": "An Electron-based desktop application for Twitter Ads Analytics API.", "main": "index.js", "scripts": { diff --git a/utils/http.js b/utils/http.js index 7651194..5c8a400 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,7 +1,8 @@ const request = require('request'); -const ASYNC_BASE_URI = ({ account_id }) => `https://ads-api.twitter.com/6/stats/jobs/accounts/${account_id}`; -const SYNC_BASE_URI = ({ account_id }) => `https://ads-api.twitter.com/6/stats/accounts/${account_id}`; +const API_VERSION = '7' +const ASYNC_BASE_URI = ({ account_id }) => `https://ads-api.twitter.com/${API_VERSION}/stats/jobs/accounts/${account_id}`; +const SYNC_BASE_URI = ({ account_id }) => `https://ads-api.twitter.com/${API_VERSION}/stats/accounts/${account_id}`; class HttpClient {