From 09b8ebd2dd1a80f08662e4d1c18015cf3b8382a3 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Thu, 25 Jan 2024 10:40:58 +0300 Subject: [PATCH] feat: update example keys urls --- .../java/ly/count/java/demo/BackendModeExample.java | 9 +++++++-- .../count/java/demo/BackendModePerformanceTests.java | 10 ++++++++-- app-java/src/main/java/ly/count/java/demo/Example.java | 9 +++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java b/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java index a160fc6b..83aaf4d9 100644 --- a/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java +++ b/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java @@ -10,8 +10,8 @@ public class BackendModeExample { final static String DEVICE_ID = "device-id"; - final static String COUNTLY_APP_KEY = "COUNTLY_APP_KEY"; - final static String COUNTLY_SERVER_URL = "https://xxx.server.ly/"; + final static String COUNTLY_SERVER_URL = "https://your.server.ly"; + final static String COUNTLY_APP_KEY = "YOUR_APP_KEY"; private static void recordUserDetailAndProperties() { Map userDetail = new ConcurrentHashMap<>(); @@ -288,6 +288,11 @@ static void recordDataWithLegacyCalls() { public static void main(String[] args) throws Exception { + if (COUNTLY_SERVER_URL.equals("https://your.server.ly") || COUNTLY_APP_KEY.equals("YOUR_APP_KEY")) { + DemoUtils.println("Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY"); + return; + } + Scanner scanner = new Scanner(System.in); Config config = new Config(COUNTLY_SERVER_URL, COUNTLY_APP_KEY) diff --git a/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java b/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java index ebb842f1..5be824dc 100644 --- a/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java +++ b/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java @@ -10,8 +10,8 @@ public final class BackendModePerformanceTests { final static String DEVICE_ID = "device-id"; - final static String COUNTLY_APP_KEY = "COUNTLY_APP_KEY"; - final static String COUNTLY_SERVER_URL = "https://xxx.server.ly/"; + final static String COUNTLY_SERVER_URL = "https://your.server.ly"; + final static String COUNTLY_APP_KEY = "YOUR_APP_KEY"; private BackendModePerformanceTests() { } @@ -170,6 +170,12 @@ static void recordBulkDataAndSendToServer() throws InterruptedException { public static void main(String[] args) throws Exception { boolean running = true; long startTime = 0; + + if (COUNTLY_SERVER_URL.equals("https://your.server.ly") || COUNTLY_APP_KEY.equals("YOUR_APP_KEY")) { + DemoUtils.println("Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY"); + return; + } + try (Scanner scanner = new Scanner(System.in)) { while (running) { diff --git a/app-java/src/main/java/ly/count/java/demo/Example.java b/app-java/src/main/java/ly/count/java/demo/Example.java index eb01fa29..ec96a831 100755 --- a/app-java/src/main/java/ly/count/java/demo/Example.java +++ b/app-java/src/main/java/ly/count/java/demo/Example.java @@ -186,8 +186,13 @@ public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); - String COUNTLY_SERVER_URL = "https://xxx.server.ly/"; - String COUNTLY_APP_KEY = "COUNTLY_APP_KEY"; + String COUNTLY_SERVER_URL = "https://your.server.ly"; + String COUNTLY_APP_KEY = "YOUR_APP_KEY"; + + if (COUNTLY_SERVER_URL.equals("https://your.server.ly") || COUNTLY_APP_KEY.equals("YOUR_APP_KEY")) { + DemoUtils.println("Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY"); + return; + } Map metricOverride = new ConcurrentHashMap<>(); metricOverride.put("aa", "11");