public class GithubApi
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GITHUB_API_HOSTNAME |
static java.lang.String |
URL_PROTOCOL |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<GithubRelease> |
getAllReleases(java.lang.String owner,
java.lang.String repo)
Returns a list of all release from the specified repository.
|
static GithubApi |
getInstance()
Returns the singleton instance of
GithubApi |
java.util.Optional<GithubRelease> |
getLatestRelease(java.lang.String owner,
java.lang.String repo)
Returns the latest release from the specified repository.
|
java.util.Optional<GithubRelease> |
getRelease(java.lang.String owner,
java.lang.String repo,
java.lang.String id)
Returns a specific release from the specified repository.
|
public static final java.lang.String GITHUB_API_HOSTNAME
public static final java.lang.String URL_PROTOCOL
public static GithubApi getInstance()
GithubApiGithubApipublic java.util.Optional<GithubRelease> getLatestRelease(java.lang.String owner, java.lang.String repo) throws java.io.IOException, java.net.URISyntaxException
owner - the repository's ownerrepo - the repository's nameOptional that contains the latest release if it could be found.java.io.IOException - if an IO error occurs while communicating with GiHubjava.net.URISyntaxException - if the crafted URI is incorrect.public java.util.Optional<GithubRelease> getRelease(java.lang.String owner, java.lang.String repo, java.lang.String id) throws java.io.IOException, java.net.URISyntaxException
owner - the repository's ownerrepo - the repository's nameid - the id of the release to retrieveOptional that contains the specified release if it could be found.java.io.IOException - if an IO error occurs while communicating with GitHub.java.net.URISyntaxException - if the crafted URI is incorrect.public java.util.List<GithubRelease> getAllReleases(java.lang.String owner, java.lang.String repo) throws java.io.IOException, java.net.URISyntaxException
owner - the repository's ownerrepo - the repository's namejava.io.IOException - if an IO error occurs while communicating with GitHub.java.net.URISyntaxException - if the crafted URI is incorrect.Copyright © 2018 Frederic Thevenet. All rights reserved.