mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
added missing repository delete operation
This commit is contained in:
@@ -272,7 +272,7 @@ public class GHRepository {
|
||||
private void edit(String key, String value) throws IOException {
|
||||
Poster poster = new Poster(root).withCredential();
|
||||
if (!key.equals("name"))
|
||||
poster.with("name",name); // even when we don't change the name, we need to send it in
|
||||
poster.with("name", name); // even when we don't change the name, we need to send it in
|
||||
poster.with(key, value)
|
||||
.to("/repos/" + owner.login + "/" + name, null, "PATCH");
|
||||
}
|
||||
@@ -314,12 +314,7 @@ public class GHRepository {
|
||||
* Deletes this repository.
|
||||
*/
|
||||
public void delete() throws IOException {
|
||||
throw new UnsupportedOperationException(); // doesn't appear to be available in V3
|
||||
// Poster poster = new Poster(root).withCredential();
|
||||
// String url = "/repos/delete/" + owner.login +"/"+name;
|
||||
//
|
||||
// DeleteToken token = poster.to(url, DeleteToken.class);
|
||||
// poster.with("delete_token", token.delete_token).to(url);
|
||||
new Poster(root).withCredential().to("/repos/" + owner.login +"/"+name, null, "DELETE");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user