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 GitHub
newGitHub()
Construct a newGitHub
without authentication.static GitHub
newGitHub(String token)
Construct a newGitHub
, authenticating via OAuth.static GitHub
newGitHub(String username, String password)
Construct a newGitHub
, authenticating via username and password.
-
-
-
Method Detail
-
newGitHub
public static GitHub newGitHub()
Construct a newGitHub
without 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
-
-