File tree Expand file tree Collapse file tree
src/main/java/com/creatubbles/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,14 @@ public class CreatubblesAPI {
4242 .property (ClientProperties .READ_TIMEOUT , 5000 );
4343
4444 public static String buildURL (final String endPoint ) {
45- return EndPoints .URL_BASE + endPoint ;
45+ String base = staging ? EndPoints .URL_BASE_STAGING : EndPoints .URL_BASE ;
46+ return base .concat (endPoint );
47+ }
48+
49+ private static boolean staging = false ;
50+
51+ public static void setStagingMode (boolean staging ) {
52+ CreatubblesAPI .staging = staging ;
4653 }
4754
4855 public static void main (String [] args ) throws IOException {
Original file line number Diff line number Diff line change 22
33public class EndPoints {
44
5- public final static String URL_BASE = "https://staging.creatubbles.com/api/v1/" ;
5+ public final static String URL_BASE = "https://www.creatubbles.com/api/v1/" ;
6+
7+ public static final String URL_BASE_STAGING = "https://staging.creatubbles.com/api/v1/" ;
68
79 public static final String SIGN_IN = "users/sign_in.json" ;
810
You can’t perform that action at this time.
0 commit comments