Skip to content

Commit

Permalink
feat: update example keys urls
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Jan 25, 2024
1 parent 9b94dd9 commit 09b8ebd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> userDetail = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand Down Expand Up @@ -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) {

Expand Down
9 changes: 7 additions & 2 deletions app-java/src/main/java/ly/count/java/demo/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> metricOverride = new ConcurrentHashMap<>();
metricOverride.put("aa", "11");
Expand Down

0 comments on commit 09b8ebd

Please sign in to comment.