public Requester with(String key, boolean value) { return _with(key, value); } public Requester with(String key, Boolean value) {
public Requester with(String key, boolean value) { return _with(key, value); } public Requester with(String key, Boolean value) {
public Requester with(String key, Boolean value) { return _with(key, value); }
public Requester with(String key, Integer value) { if (value!=null) _with(key, value); return this; }
public Requester with(String key, Integer value) { if (value!=null) _with(key, value); return this; }
/** * Unlike {@link #with(String, String)}, overrides the existing value */ public Requester set(String key, Object value) { for (Entry e : args) { if (e.key.equals(key)) { e.value = value; return this; } } return _with(key,value); }
/** * Unlike {@link #with(String, String)}, overrides the existing value */ public Requester set(String key, Object value) { for (Entry e : args) { if (e.key.equals(key)) { e.value = value; return this; } } return _with(key,value); }
public Requester with(String key, Integer value) { if (value!=null) _with(key, value.intValue()); return this; }
/** * Unlike {@link #with(String, String)}, overrides the existing value */ public Requester set(String key, Object value) { for (Entry e : args) { if (e.key.equals(key)) { e.value = value; return this; } } return _with(key,value); }
/** * Configures the committer of this commit. */ public GHCommitBuilder committer(String name, String email, Date date) { req._with("committer", new UserInfo(name, email, date)); return this; }
/** * Configures the author of this commit. */ public GHCommitBuilder author(String name, String email, Date date) { req._with("author", new UserInfo(name, email, date)); return this; }
public Requester with(String key, Enum e) { if (e==null) return _with(key, null); // by convention Java constant names are upper cases, but github uses // lower-case constants. GitHub also uses '-', which in Java we always // replace by '_' return with(key, e.toString().toLowerCase(Locale.ENGLISH).replace('_', '-')); }
/** * Configures the committer of this commit. */ public GHCommitBuilder committer(String name, String email, Date date) { req._with("committer", new UserInfo(name, email, date)); return this; }
/** * Configures the author of this commit. */ public GHCommitBuilder author(String name, String email, Date date) { req._with("author", new UserInfo(name, email, date)); return this; }
/** * Creates a Gist based on the parameters specified thus far. */ public GHGist create() throws IOException { req._with("files",files); return req.to("/gists",GHGist.class).wrapUp(root); } }
/** * Creates a tree based on the parameters specified thus far. */ public GHTree create() throws IOException { req._with("tree", treeEntries); return req.method("POST").to(getApiTail(), GHTree.class).wrap(repo); } }
/** * Creates a blob based on the parameters specified thus far. */ public GHCommit create() throws IOException { req._with("parents", parents); return req.method("POST").to(getApiTail(), GHCommit.class).wrapUp(repo); } }
/** * Creates a blob based on the parameters specified thus far. */ public GHCommit create() throws IOException { req._with("parents", parents); return req.method("POST").to(getApiTail(), GHCommit.class).wrapUp(repo); } }
private void edit(String key, Object value) throws IOException { new Requester(root)._with(key, value).method("PATCH").to(getApiRoute()); }
public GHPullRequestReview create() throws IOException { return builder.method("POST")._with("comments",comments) .to(pr.getApiRoute() + "/reviews", GHPullRequestReview.class) .wrapUp(pr); }