Change api base to runeliteplus

Signed-off-by: James Munson <jmunson@openpoll.io>
This commit is contained in:
James Munson
2019-06-25 23:01:15 -07:00
parent 8c045dcb0f
commit 09939fc03f

View File

@@ -225,7 +225,7 @@ public class ChatClient
public boolean submitGc(String username, int gc) throws IOException public boolean submitGc(String username, int gc) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("gc") .addPathSegment("gc")
.addQueryParameter("name", username) .addQueryParameter("name", username)
@@ -237,7 +237,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
return response.isSuccessful(); return response.isSuccessful();
} }
@@ -245,7 +245,7 @@ public class ChatClient
public int getGc(String username) throws IOException public int getGc(String username) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("gc") .addPathSegment("gc")
.addQueryParameter("name", username) .addQueryParameter("name", username)
@@ -255,7 +255,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
if (!response.isSuccessful()) if (!response.isSuccessful())
{ {
@@ -272,7 +272,7 @@ public class ChatClient
throw new IOException("Layout " + layout + " is not valid!"); throw new IOException("Layout " + layout + " is not valid!");
} }
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("layout") .addPathSegment("layout")
.addQueryParameter("name", username) .addQueryParameter("name", username)
@@ -284,7 +284,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
return response.isSuccessful(); return response.isSuccessful();
} }
@@ -292,7 +292,7 @@ public class ChatClient
public String getLayout(String username) throws IOException public String getLayout(String username) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("layout") .addPathSegment("layout")
.addQueryParameter("name", username) .addQueryParameter("name", username)
@@ -302,7 +302,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
if (!response.isSuccessful()) if (!response.isSuccessful())
{ {
@@ -327,7 +327,7 @@ public class ChatClient
public House[] getHosts(int world, String location) throws IOException public House[] getHosts(int world, String location) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("hosts") .addPathSegment("hosts")
.addQueryParameter("world", Integer.toString(world)) .addQueryParameter("world", Integer.toString(world))
@@ -338,7 +338,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
if (!response.isSuccessful()) if (!response.isSuccessful())
{ {
@@ -356,7 +356,7 @@ public class ChatClient
public boolean submitHost(int world, String location, House house) throws IOException public boolean submitHost(int world, String location, House house) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("hosts") .addPathSegment("hosts")
.addQueryParameter("world", Integer.toString(world)) .addQueryParameter("world", Integer.toString(world))
@@ -376,7 +376,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
return response.isSuccessful(); return response.isSuccessful();
} }
@@ -384,7 +384,7 @@ public class ChatClient
public boolean removeHost(int world, String location, House house) throws IOException public boolean removeHost(int world, String location, House house) throws IOException
{ {
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder() HttpUrl url = RuneLiteAPI.getPlusApiBase().newBuilder()
.addPathSegment("chat") .addPathSegment("chat")
.addPathSegment("hosts") .addPathSegment("hosts")
.addQueryParameter("world", Integer.toString(world)) .addQueryParameter("world", Integer.toString(world))
@@ -405,7 +405,7 @@ public class ChatClient
.url(url) .url(url)
.build(); .build();
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute()) try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{ {
return response.isSuccessful(); return response.isSuccessful();
} }