Package com.sudicode.fb2gh.fogbugz
Class FBFactory
- java.lang.Object
-
- com.sudicode.fb2gh.fogbugz.FBFactory
-
public class FBFactory extends Object
This factory uses the FogBugz API to interact with a given FogBugz instance. You will need to supply the URL of your FogBugz instance, which will be referenced here as
If you have an API token, you can generatebaseURL
.FogBugz
instances like so:FogBugz fb = FBFactory.newFogBugz(baseURL, authToken);
Otherwise, you can alternatively use:FogBugz fb = FBFactory.newFogBugz(baseURL, email, password);
After instantiating, you may then usefb.getAuthToken();
to obtain a valid API token for later.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FogBugz
newFogBugz(String baseURL, String authToken)
Create a newFogBugz
.static FogBugz
newFogBugz(String baseURL, String email, String password)
Create a newFogBugz
from the given email and password.
-
-
-
Method Detail
-
newFogBugz
public static FogBugz newFogBugz(String baseURL, String authToken) throws FB2GHException
Create a newFogBugz
.- Parameters:
baseURL
- The FogBugz URLauthToken
- FogBugz API token- Returns:
- The
FogBugz
- Throws:
FB2GHException
- if there is an API issue.- See Also:
- How To Get a FogBugz XML API Token
-
newFogBugz
public static FogBugz newFogBugz(String baseURL, String email, String password) throws FB2GHException
Create a newFogBugz
from the given email and password.- Parameters:
baseURL
- The FogBugz URLemail
- FogBugz emailpassword
- FogBugz password- Returns:
- The
FogBugz
- Throws:
FB2GHException
- if there is an API issue.
-
-