mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Add JavaDocs
Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
This commit is contained in:
@@ -4,6 +4,9 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* The type GHDeployKey.
|
||||
*/
|
||||
public class GHDeployKey {
|
||||
|
||||
protected String url, key, title;
|
||||
@@ -11,26 +14,58 @@ public class GHDeployKey {
|
||||
protected long id;
|
||||
private GHRepository owner;
|
||||
|
||||
/**
|
||||
* Gets id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets key.
|
||||
*
|
||||
* @return the key
|
||||
*/
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets title.
|
||||
*
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets url.
|
||||
*
|
||||
* @return the url
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is verified boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
public boolean isVerified() {
|
||||
return verified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap gh deploy key.
|
||||
*
|
||||
* @param repo
|
||||
* the repo
|
||||
* @return the gh deploy key
|
||||
*/
|
||||
public GHDeployKey wrap(GHRepository repo) {
|
||||
this.owner = repo;
|
||||
return this;
|
||||
@@ -40,6 +75,12 @@ public class GHDeployKey {
|
||||
return new ToStringBuilder(this).append("title", title).append("id", id).append("key", key).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete.
|
||||
*
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public void delete() throws IOException {
|
||||
new Requester(owner.root).method("DELETE")
|
||||
.to(String.format("/repos/%s/%s/keys/%d", owner.getOwnerName(), owner.getName(), id));
|
||||
|
||||
Reference in New Issue
Block a user