From feba6b1829596d3cb6eede5659d94f7de5afbad1 Mon Sep 17 00:00:00 2001 From: Shohei Maeda Date: Fri, 6 Mar 2020 16:21:01 +0900 Subject: [PATCH] bump version (Ads API version 7) --- package.json | 2 +- utils/http.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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 {