forked from PingPlusPlus/pingpp-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPingpp.java
More file actions
42 lines (35 loc) · 1.09 KB
/
Pingpp.java
File metadata and controls
42 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.pingplusplus;
public abstract class Pingpp
{
public static final String LIVE_API_BASE = "https://api.pingxx.com/";
public static final String VERSION = "2.0.0";
public static volatile String apiKey;
public static volatile String apiVersion = "2015-01-01";
private static volatile boolean verifySSL = true;
private static volatile String apiBase = LIVE_API_BASE;
/**
* (FOR TESTING ONLY)
* If you'd like your API requests to hit your own (mocked) server,
* you can set this up here by overriding the base api URL.
*/
public static void overrideApiBase(final String overriddenApiBase) {
apiBase = overriddenApiBase;
}
/**
* (FOR TESTING ONLY)
* Only disable SSL verification if you're using your own (mocked) server.
* Disabling verification on pingxx.com is not supported
*/
public static void setVerifySSL(boolean verify) {
verifySSL = verify;
}
public static boolean getVerifySSL() {
return verifySSL;
}
public static String getApiBase() {
return apiBase;
}
public static void setApiBase(String apiBase) {
Pingpp.apiBase = apiBase;
}
}