Skip to content

Commit

Permalink
Merge pull request #6 from adbutler/custom_domains
Browse files Browse the repository at this point in the history
Add custom domain setter
  • Loading branch information
wprevett authored Feb 14, 2020
2 parents bc16eef + 92fcf6e commit ef4aafe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
29 changes: 0 additions & 29 deletions .idea/codeStyles/Project.xml

This file was deleted.

7 changes: 6 additions & 1 deletion sdk/src/main/java/com/sparklit/adbutler/AdButler.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
*/
public class AdButler {
static String ADBUTLER_ENDPOINT = "https://servedbyadbutler.com/adserve/";
static String DOMAIN = "servedbyadbutler.com";

private APIService service;

public void setDomain(String domain){
DOMAIN = domain;
}

/**
* Requests a pixel.
*
Expand Down Expand Up @@ -129,7 +134,7 @@ private APIService getAPIService() {
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
.create();
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl(ADBUTLER_ENDPOINT)
.baseUrl("https://" + DOMAIN + "/adserve/")
.addConverterFactory(GsonConverterFactory.create(gson));
service = builder.build().create(APIService.class);
}
Expand Down

0 comments on commit ef4aafe

Please sign in to comment.