Merge remote-tracking branch 'upstream/master' into maven-plugin-upgrades

This commit is contained in:
William Collishaw
2019-05-26 14:52:16 -06:00
75 changed files with 1930 additions and 899 deletions

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.24-SNAPSHOT</version>
<version>1.5.25-SNAPSHOT</version>
</parent>
<name>Web API</name>

View File

@@ -95,23 +95,51 @@ public class RuneLiteAPI
.build();
}
public static HttpUrl getApiRoot()
public static HttpUrl getSessionBase()
{
return HttpUrl.parse(BASE);
final String prop = System.getProperty("runelite.session.url");
if (prop != null && !prop.isEmpty())
{
return HttpUrl.parse(prop);
}
return HttpUrl.parse(BASE + "/session");
}
public static HttpUrl getApiBase()
{
final String prop = System.getProperty("runelite.http-service.url");
if (prop != null && !prop.isEmpty())
{
return HttpUrl.parse(prop);
}
return HttpUrl.parse(BASE + "/runelite-" + getVersion());
}
public static HttpUrl getStaticBase()
{
final String prop = System.getProperty("runelite.static.url");
if (prop != null && !prop.isEmpty())
{
return HttpUrl.parse(prop);
}
return HttpUrl.parse(STATICBASE);
}
public static HttpUrl getWsEndpoint()
{
final String prop = System.getProperty("runelite.ws.url");
if (prop != null && !prop.isEmpty())
{
return HttpUrl.parse(prop);
}
return HttpUrl.parse(WSBASE);
}