Class GitHubAPI
java.lang.Object
edu.sustech.search.engine.github.API.RestAPI
edu.sustech.search.engine.github.API.GitHubAPI
Provides the entry to interact with the GitHub RestAPI.
The class needs to be instantiated with an OAuthToken to unlock all functionalities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ContentAPI
final FileAPI
final RepositoryAPI
final SearchAPI
final UserAPI
Fields inherited from class edu.sustech.search.engine.github.API.RestAPI
TIME_OUT_DURATION
-
Method Summary
Modifier and TypeMethodDescriptionstatic GitHubAPI
registerAPI
(String... OAuthTokens) Initialize a new GitHubAPI instance to interact with.static GitHubAPI
registerAPI
(List<String> OAuthTokens) Initialize a new GitHubAPI instance to interact with.Methods inherited from class edu.sustech.search.engine.github.API.RestAPI
addToken, convert, getHttpResponse, getHttpResponse, getHttpResponseLoopFetching, getHttpResponseLoopFetching, getHttpResponseLoopFetching, getHttpResponseLoopFetching, getHttpResponseRaw, getHttpResponseRaw, getHttpResponseRawLoopFetching, getHttpResponseRawLoopFetching, getHttpResponseRawLoopFetching, getHttpResponseRawLoopFetching, getNextToken, getRateLimit, getTokenCursor, parseEndPageCount, printRateLimit, setSuppressRateError, setSuppressResponseError, setTokenCursor
-
Field Details
-
searchAPI
-
repositoryAPI
-
userAPI
-
contentAPI
-
fileAPI
-
-
Method Details
-
registerAPI
Initialize a new GitHubAPI instance to interact with.- Parameters:
OAuthTokens
- Array of Personal Access Token, or OAuthToken, which will be used for authentication. If set tonull
, then no OAuthToken will be used.- Returns:
- A new GitHubAPI with specific OAuthToken initialized as the certificate for authentication.
-
registerAPI
Initialize a new GitHubAPI instance to interact with.- Parameters:
OAuthTokens
- List of Personal Access Token, or OAuthToken, which will be used for authentication. If set tonull
, then no OAuthToken will be used.- Returns:
- A new GitHubAPI with specific OAuthToken initialized as the certificate for authentication.
-