@Immutable @Loggable(value=1) public final class RtGithub extends Object implements Github
This is how you start communicating with Github API:
Github github = new RtGithub(oauthKey);
Repo repo = github.repos().get(
new Coordinates.Simple("jcabi/jcabi-github")
);
Issues issues = repo.issues();
Issue issue = issues.create("issue title", "issue body");
issue.comments().post("issue comment");
It is strongly recommended to use
RetryWire to avoid
accidental I/O exceptions:
Github github = new RtGithub( new RtGithub(oauthKey).entry().through(RetryWire.class) );
Github.Time| Constructor and Description |
|---|
RtGithub()
Public ctor, for anonymous access to Github.
|
RtGithub(com.jcabi.http.Request req)
Public ctor, with a custom request.
|
RtGithub(String token)
Public ctor, for authentication with OAuth2 token.
|
RtGithub(String user,
String pwd)
Public ctor, for HTTP Basic Authentication.
|
| Modifier and Type | Method and Description |
|---|---|
javax.json.JsonObject |
emojis()
Get emojis.
|
com.jcabi.http.Request |
entry()
RESTful request, an entry point to the Github API.
|
Gists |
gists()
Get Gists API entry point.
|
Gitignores |
gitignores()
Get gitignores.
|
Limits |
limits()
Rate limit API entry point.
|
Markdown |
markdown()
Get Markdown API entry point.
|
javax.json.JsonObject |
meta()
Get meta information.
|
Organizations |
organizations()
Get Organizations API entry point.
|
Repos |
repos()
Get repositories.
|
Search |
search()
Search API entry point.
|
Users |
users()
Get Users API entry point.
|
public RtGithub()
public RtGithub(String user, String pwd)
user - User namepwd - Passwordpublic RtGithub(String token)
token - OAuth tokenpublic RtGithub(com.jcabi.http.Request req)
req - Request to start frompublic com.jcabi.http.Request entry()
Githubpublic Organizations organizations()
Githuborganizations in interface Githubpublic javax.json.JsonObject meta()
throws IOException
Githubmeta in interface GithubIOException - If there is any I/O problempublic javax.json.JsonObject emojis()
throws IOException
Githubemojis in interface GithubIOException - If there is any I/O problempublic Gitignores gitignores() throws IOException
Githubgitignores in interface GithubIOException - If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.