mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-23 15:50:48 +00:00
Rename methods for better clarity
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user