@Immutable @Loggable(value=1) public final class MkGithub extends Object implements Github
This is how you use it:
Github github = new MkGithub(new MkStorage.InFile(file), "jeff"); github.repos().create("jcabi/jcabi-github"); Repo repo = github.repos().get("jcabi/jcabi-github"); Issues issues = repo.issues(); Issue issue = issues.post("issue title", "issue body");
By default, it works with a temporary file, which will be deleted on JVM exit:
Github github = new MkGithub("jeff");
Github.Time
Constructor and Description |
---|
MkGithub()
Public ctor.
|
MkGithub(MkStorage stg,
String login)
Public ctor.
|
MkGithub(String login)
Public ctor.
|
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.
|
Repo |
randomRepo()
Create repo with random name.
|
Github |
relogin(String login)
Relogin.
|
Repos |
repos()
Get repositories.
|
Search |
search()
Search API entry point.
|
String |
toString() |
Users |
users()
Get Users API entry point.
|
public MkGithub() throws IOException
IOException
- If there is any I/O problempublic MkGithub(@NotNull(message="login can\'t be NULL") String login) throws IOException
login
- User to loginIOException
- If there is any I/O problem@NotNull(message="entry request is never NULL") public com.jcabi.http.Request entry()
Github
@NotNull(message="repos is never NULL") public Repos repos()
Github
@NotNull(message="gists is never NULL") public Gists gists()
Github
@NotNull(message="users is never NULL") public Users users()
Github
@NotNull(message="limits is never NULL") public Limits limits()
Github
@NotNull(message="JSON meta is never NULL") public javax.json.JsonObject meta()
Github
@NotNull(message="Search is never NULL") public Search search()
Github
@NotNull(message="Gitignores is never NULL") public Gitignores gitignores() throws IOException
Github
gitignores
in interface Github
IOException
- If there is any I/O problem@NotNull(message="emojis JSON is never NULL") public javax.json.JsonObject emojis()
Github
emojis
in interface Github
@NotNull(message="markdown is never NULL") public Markdown markdown()
Github
@NotNull(message="github is never NULL") public Github relogin(@NotNull(message="login is never NULL") String login) throws IOException
login
- User to loginIOException
- If there is any I/O problem@NotNull(message="Repo is never NULL") public Repo randomRepo() throws IOException
IOException
- If failsCopyright © 2012–2014 jcabi.com. All rights reserved.