Rename methods for better clarity

This commit is contained in:
Liam Newman
2019-12-17 12:41:23 -08:00
parent 40f05e4dbb
commit 305267d07f
60 changed files with 471 additions and 395 deletions

View File

@@ -161,7 +161,7 @@ public class GHThread extends GHObject {
* the io exception
*/
public void markAsRead() throws IOException {
root.retrieve().method("PATCH").withUrlPath(url).to();
root.createRequest().method("PATCH").withUrlPath(url).send();
}
/**
@@ -176,12 +176,12 @@ public class GHThread extends GHObject {
* the io exception
*/
public GHSubscription subscribe(boolean subscribed, boolean ignored) throws IOException {
return root.retrieve()
return root.createRequest()
.method("PUT")
.with("subscribed", subscribed)
.with("ignored", ignored)
.withUrlPath(subscription_url)
.to(GHSubscription.class)
.fetch(GHSubscription.class)
.wrapUp(root);
}
@@ -194,7 +194,11 @@ public class GHThread extends GHObject {
*/
public GHSubscription getSubscription() throws IOException {
try {
return root.retrieve().method("POST").withUrlPath(subscription_url).to(GHSubscription.class).wrapUp(root);
return root.createRequest()
.method("POST")
.withUrlPath(subscription_url)
.fetch(GHSubscription.class)
.wrapUp(root);
} catch (FileNotFoundException e) {
return null;
}