Merge pull request #339 from runelite-extended/switchtooursession
Switch to our session endpoint
This commit is contained in:
@@ -48,6 +48,7 @@ public class RuneLiteAPI
|
||||
public static String userAgent;
|
||||
|
||||
private static final String BASE = "https://api.runelite.net";
|
||||
private static final String RLPLUS = "https://session.runelitepl.us";
|
||||
private static final String WSBASE = "https://api.runelite.net/ws";
|
||||
private static final String STATICBASE = "https://static.runelite.net";
|
||||
private static final Properties properties = new Properties();
|
||||
@@ -100,6 +101,11 @@ public class RuneLiteAPI
|
||||
return HttpUrl.parse(BASE);
|
||||
}
|
||||
|
||||
public static HttpUrl getSessionBase()
|
||||
{
|
||||
return HttpUrl.parse(RLPLUS);
|
||||
}
|
||||
|
||||
public static HttpUrl getApiBase()
|
||||
{
|
||||
return HttpUrl.parse(BASE + "/runelite-" + getVersion());
|
||||
|
||||
@@ -39,8 +39,7 @@ class SessionClient
|
||||
{
|
||||
UUID open() throws IOException
|
||||
{
|
||||
HttpUrl url = RuneLiteAPI.getApiRoot().newBuilder()
|
||||
.addPathSegment("session")
|
||||
HttpUrl url = RuneLiteAPI.getSessionBase().newBuilder()
|
||||
.build();
|
||||
|
||||
Request request = new Request.Builder()
|
||||
@@ -62,8 +61,7 @@ class SessionClient
|
||||
|
||||
void ping(UUID uuid) throws IOException
|
||||
{
|
||||
HttpUrl url = RuneLiteAPI.getApiRoot().newBuilder()
|
||||
.addPathSegment("session")
|
||||
HttpUrl url = RuneLiteAPI.getSessionBase().newBuilder()
|
||||
.addPathSegment("ping")
|
||||
.addQueryParameter("session", uuid.toString())
|
||||
.build();
|
||||
@@ -83,8 +81,7 @@ class SessionClient
|
||||
|
||||
void delete(UUID uuid) throws IOException
|
||||
{
|
||||
HttpUrl url = RuneLiteAPI.getApiRoot().newBuilder()
|
||||
.addPathSegment("session")
|
||||
HttpUrl url = RuneLiteAPI.getSessionBase().newBuilder()
|
||||
.addQueryParameter("session", uuid.toString())
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user