クラス GithubApiGateway
java.lang.Object
org.thinkit.api.gateway.github.AbstractApiGateway
org.thinkit.api.gateway.github.GithubApiGateway
- すべての実装されたインタフェース:
Serializable
,Gateway
public final class GithubApiGateway extends AbstractApiGateway
It provides a gateway for intuitive and easy access to the GitHub API.
If you have an API that you want to use with the GitHub API, you can use this interface without having to be aware of the various implementations and mechanisms required for communication. As a user, all you need to be aware of is to call each method defined in this class and use the returned object. The object returned from methods of this class has the same structure and items as the JSON data returned from each GitHub API.
For example, if you want to get the follower information associated with a
particular user, you can call #getUserFollowers()
like below.
final GithubUser githubUser = GithubUser.builder().userName("username").build();
final Gateway gateway = GithubApiGateway.from(githubUser);
final List<UserFollowers> userFollowers = gateway.getUserFollowers();
- 導入されたバージョン:
- 1.0.0
- 関連項目:
- 直列化された形式
-
メソッドの概要
修飾子とタイプ メソッド 説明 boolean
equals(Object o)
static Gateway
from(@NonNull GithubUser githubUser)
Returns the new instance ofGithubApiGateway
based on the argument.static Gateway
from(@NonNull GithubUser githubUser, @NonNull OAuthConfig oAuthConfig)
Returns the new instance ofGithubApiGateway
based on the argument.RepositoryApi
getRepositoryApi()
UsersApi
getUsersApi()
int
hashCode()
String
toString()
-
メソッドの詳細
-
from
Returns the new instance ofGithubApiGateway
based on the argument.- パラメータ:
githubUser
- The GitHub user- 戻り値:
- The new instance of
GithubApiGateway
- 例外:
NullPointerException
- Ifnull
is passed as an argument
-
from
public static Gateway from(@NonNull @NonNull GithubUser githubUser, @NonNull @NonNull OAuthConfig oAuthConfig)Returns the new instance ofGithubApiGateway
based on the argument.- パラメータ:
githubUser
- The GitHub useroAuthConfig
- The OAuth config- 戻り値:
- The new instance of
GithubApiGateway
- 例外:
NullPointerException
- Ifnull
is passed as an argument
-
getUsersApi
-
getRepositoryApi
-
toString
- オーバーライド:
toString
クラス内AbstractApiGateway
-
equals
- オーバーライド:
equals
クラス内AbstractApiGateway
-
hashCode
public int hashCode()- オーバーライド:
hashCode
クラス内AbstractApiGateway
-