Class GHFactory


  • public final class GHFactory
    extends Object
    Factory used to interact with GitHub.
    • Method Detail

      • newGitHub

        public static GitHub newGitHub()
        Construct a new GitHub without authentication.
        Returns:
        The GitHub
      • newGitHub

        public static GitHub newGitHub​(String token)
        Construct a new GitHub, authenticating via OAuth.
        Parameters:
        token - The OAuth token.
        Returns:
        The GitHub
        See Also:
        OAuth
      • newGitHub

        public static GitHub newGitHub​(String username,
                                       String password)
        Construct a new GitHub, authenticating via username and password.

        (Note: This method will not work with two-factor authentication. Accounts protected by 2FA must use newGitHub(String) instead.)

        Parameters:
        username - GitHub username
        password - GitHub password
        Returns:
        The GitHub