Package com.sudicode.fb2gh.github
Class GHFactory
- java.lang.Object
-
- com.sudicode.fb2gh.github.GHFactory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GitHubnewGitHub()Construct a newGitHubwithout authentication.static GitHubnewGitHub(String token)Construct a newGitHub, authenticating via OAuth.static GitHubnewGitHub(String username, String password)Construct a newGitHub, authenticating via username and password.
-
-
-
Method Detail
-
newGitHub
public static GitHub newGitHub()
Construct a newGitHubwithout authentication.- Returns:
- The
GitHub
-
newGitHub
public static GitHub newGitHub(String token)
Construct a newGitHub, authenticating via OAuth.
-
newGitHub
public static GitHub newGitHub(String username, String password)
Construct a newGitHub, 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 usernamepassword- GitHub password- Returns:
- The
GitHub
-
-