Skip to content

Commit 86bc950

Browse files
committed
Change SQL endpoint
1 parent fb460d5 commit 86bc950

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/main/java/com/slicingdice/jslicer/utils/URLResources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public enum URLResources {
3535
QUERY_DATA_EXTRACTION_RESULT("/data_extraction/result/"),
3636
QUERY_DATA_EXTRACTION_SCORE("/data_extraction/score/"),
3737
DATABASE("/database/"),
38-
QUERY_SQL("/query/sql/");
38+
QUERY_SQL("/sql/");
3939

4040
public final String url;
4141

src/test/java/com/slicingdice/jslicer/RunQueryTests.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ public class RunQueryTests {
88
// http://panel.slicingdice.com/docs/#api-details-api-connection-api-keys-demo-key
99
private static final String DEMO_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiJkZW1vNzAzM20iLCJwZXJtaXNzaW9uX2xldmVsIjozLCJwcm9qZWN0X2lkIjoyNzAzMywiY2xpZW50X2lkIjoxMH0.8lLB7vDAj8SecpHUsgCyZm4yRoizqggKPRm4Q9BfEu8";
1010

11+
private static String getDemoKey() {
12+
String demoApiKey = System.getenv("SD_API_KEY");
13+
14+
if (demoApiKey == null) {
15+
demoApiKey = DEMO_API_KEY;
16+
}
17+
18+
return demoApiKey;
19+
}
20+
1121
public static void main(final String[] args) throws ExecutionException, InterruptedException {
1222
// the query types to use on tests
1323
final ArrayList<String> queryTypes = new ArrayList<String>() {{
@@ -20,7 +30,7 @@ public static void main(final String[] args) throws ExecutionException, Interrup
2030
}};
2131

2232
// Testing class with demo API key
23-
final SlicingDiceTester sdTester = new SlicingDiceTester(DEMO_API_KEY, true);
33+
final SlicingDiceTester sdTester = new SlicingDiceTester(getDemoKey(), true);
2434

2535
Runtime.getRuntime().addShutdownHook(new Thread()
2636
{

0 commit comments

Comments
 (0)