Class GitHubAPI

java.lang.Object
edu.sustech.search.engine.github.API.RestAPI
edu.sustech.search.engine.github.API.GitHubAPI

public class GitHubAPI extends RestAPI
Provides the entry to interact with the GitHub RestAPI. The class needs to be instantiated with an OAuthToken to unlock all functionalities.
  • Field Details

  • Method Details

    • registerAPI

      public static GitHubAPI registerAPI(String... OAuthTokens)
      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 to null, then no OAuthToken will be used.
      Returns:
      A new GitHubAPI with specific OAuthToken initialized as the certificate for authentication.
    • registerAPI

      public static GitHubAPI registerAPI(List<String> OAuthTokens)
      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 to null, then no OAuthToken will be used.
      Returns:
      A new GitHubAPI with specific OAuthToken initialized as the certificate for authentication.