Skip to content

Commit

Permalink
Consistently capitalize RuneLite
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jan 7, 2018
1 parent 6a8af39 commit eb24cae
Show file tree
Hide file tree
Showing 39 changed files with 128 additions and 128 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For more information visit the [RuneLite Wiki](https://github.com/runelite/runel

### License

Most of Runelite is licensed under the BSD 2-clause license. See the license header in the respective file to be sure.
Most of RuneLite is licensed under the BSD 2-clause license. See the license header in the respective file to be sure.
Some of the code, like everything in runescape-client, is automatically generated, and is not licensed.

## Contribute and Develop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public void dump() throws IOException
}
}

System.out.println("Runelite http://github.com/runelite");
System.out.println("RuneLite http://github.com/runelite");
System.out.println("Run " + Instant.now());
System.out.println("Classes: " + classes + ", methods: " + methods + ", fields: " + fields);
System.out.println("Gamepack " + properties.getRsVersion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RuneliteAPI
public class RuneLiteAPI
{
private static final Logger logger = LoggerFactory.getLogger(RuneliteAPI.class);
private static final Logger logger = LoggerFactory.getLogger(RuneLiteAPI.class);

public static final String RUNELITE_AUTH = "RUNELITE-AUTH";

Expand All @@ -52,7 +52,7 @@ public class RuneliteAPI
{
try
{
InputStream in = RuneliteAPI.class.getResourceAsStream("/runelite.properties");
InputStream in = RuneLiteAPI.class.getResourceAsStream("/runelite.properties");
properties.load(in);

version = properties.getProperty("runelite.version");
Expand Down Expand Up @@ -81,7 +81,7 @@ public static String getVersion()

public static void setVersion(String version)
{
RuneliteAPI.version = version;
RuneLiteAPI.version = version;
}

public static int getRsVersion()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.UUID;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.Request;
import okhttp3.Response;
Expand All @@ -53,7 +53,7 @@ public AccountClient(UUID uuid)

public OAuthResponse login() throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("account")
.addPathSegment("login")
.build();
Expand All @@ -64,10 +64,10 @@ public OAuthResponse login() throws IOException
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), OAuthResponse.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), OAuthResponse.class);
}
catch (JsonParseException ex)
{
Expand All @@ -77,39 +77,39 @@ public OAuthResponse login() throws IOException

public void logout() throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("account")
.addPathSegment("logout")
.build();

logger.debug("Built URI: {}", url);

Request request = new Request.Builder()
.header(RuneliteAPI.RUNELITE_AUTH, uuid.toString())
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
logger.debug("Sent logout request");
}
}

public boolean sesssionCheck()
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("account")
.addPathSegment("session-check")
.build();

logger.debug("Built URI: {}", url);

Request request = new Request.Builder()
.header(RuneliteAPI.RUNELITE_AUTH, uuid.toString())
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
return response.isSuccessful();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.UUID;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.Request;
Expand All @@ -53,21 +53,21 @@ public ConfigClient(UUID uuid)

public Configuration get() throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("config")
.build();

logger.debug("Built URI: {}", url);

Request request = new Request.Builder()
.header(RuneliteAPI.RUNELITE_AUTH, uuid.toString())
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), Configuration.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), Configuration.class);
}
catch (JsonParseException ex)
{
Expand All @@ -77,7 +77,7 @@ public Configuration get() throws IOException

public void set(String key, String value) throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("config")
.addPathSegment(key)
.build();
Expand All @@ -86,19 +86,19 @@ public void set(String key, String value) throws IOException

Request request = new Request.Builder()
.put(RequestBody.create(TEXT_PLAIN, value))
.header(RuneliteAPI.RUNELITE_AUTH, uuid.toString())
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
logger.debug("Set configuration value '{}' to '{}'", key, value);
}
}

public void unset(String key) throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("config")
.addPathSegment(key)
.build();
Expand All @@ -107,11 +107,11 @@ public void unset(String key) throws IOException

Request request = new Request.Builder()
.delete()
.header(RuneliteAPI.RUNELITE_AUTH, uuid.toString())
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
logger.debug("Unset configuration value '{}'", key);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
package net.runelite.http.api.examine;

import java.io.IOException;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.Request;
Expand Down Expand Up @@ -57,7 +57,7 @@ public void submitItem(int id, String text) throws IOException

private void submit(String type, int id, String text) throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("examine")
.addPathSegment(type)
.addPathSegment(Integer.toString(id))
Expand All @@ -70,7 +70,7 @@ private void submit(String type, int id, String text) throws IOException
.post(RequestBody.create(TEXT, text))
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
logger.debug("Submitted examine info for {} {}: {}",
type, id, text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.Request;
import okhttp3.Response;
Expand All @@ -41,7 +41,7 @@ public class HiscoreClient

public HiscoreResult lookup(String username, HiscoreEndpoint endpoint) throws IOException
{
HttpUrl.Builder builder = RuneliteAPI.getApiBase().newBuilder()
HttpUrl.Builder builder = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("hiscore")
.addPathSegment(endpoint.name().toLowerCase())
.addQueryParameter("username", username);
Expand All @@ -54,10 +54,10 @@ public HiscoreResult lookup(String username, HiscoreEndpoint endpoint) throws IO
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), HiscoreResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), HiscoreResult.class);
}
catch (JsonParseException ex)
{
Expand All @@ -72,7 +72,7 @@ public HiscoreResult lookup(String username) throws IOException

public SingleHiscoreSkillResult lookup(String username, HiscoreSkill skill, HiscoreEndpoint endpoint) throws IOException
{
HttpUrl.Builder builder = RuneliteAPI.getApiBase().newBuilder()
HttpUrl.Builder builder = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("hiscore")
.addPathSegment(endpoint.name())
.addPathSegment(skill.toString().toLowerCase())
Expand All @@ -86,10 +86,10 @@ public SingleHiscoreSkillResult lookup(String username, HiscoreSkill skill, Hisc
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), SingleHiscoreSkillResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), SingleHiscoreSkillResult.class);
}
catch (JsonParseException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.Request;
import okhttp3.Response;
Expand All @@ -41,7 +41,7 @@ public class ItemClient

public ItemPrice lookupItemPrice(int itemId) throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("item")
.addPathSegment("" + itemId)
.addPathSegment("price")
Expand All @@ -53,7 +53,7 @@ public ItemPrice lookupItemPrice(int itemId) throws IOException
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
if (!response.isSuccessful())
{
Expand All @@ -62,7 +62,7 @@ public ItemPrice lookupItemPrice(int itemId) throws IOException
}

InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), ItemPrice.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), ItemPrice.class);
}
catch (JsonParseException ex)
{
Expand All @@ -72,7 +72,7 @@ public ItemPrice lookupItemPrice(int itemId) throws IOException

public SearchResult search(String itemName) throws IOException
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("item")
.addPathSegment("search")
.addQueryParameter("query", itemName)
Expand All @@ -84,7 +84,7 @@ public SearchResult search(String itemName) throws IOException
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
if (!response.isSuccessful())
{
Expand All @@ -93,7 +93,7 @@ public SearchResult search(String itemName) throws IOException
}

InputStream in = response.body().byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), SearchResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), SearchResult.class);
}
catch (JsonParseException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import net.runelite.http.api.RuneliteAPI;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.Request;
import okhttp3.Response;
Expand All @@ -42,7 +42,7 @@ public class UpdateCheckClient

public boolean isOutdated()
{
HttpUrl url = RuneliteAPI.getApiBase().newBuilder()
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("update-check")
.build();

Expand All @@ -52,12 +52,12 @@ public boolean isOutdated()
.url(url)
.build();

try (Response response = RuneliteAPI.CLIENT.newCall(request).execute())
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
ResponseBody body = response.body();

InputStream in = body.byteStream();
return RuneliteAPI.GSON.fromJson(new InputStreamReader(in), boolean.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), boolean.class);
}
catch (JsonParseException | IOException ex)
{
Expand Down
Loading

0 comments on commit eb24cae

Please sign in to comment.