Class BitbucketClient
- java.lang.Object
-
- jetbrains.buildServer.serverSide.oauth.bitbucket.BitbucketClient
-
public class BitbucketClient extends Object
-
-
Constructor Summary
Constructors Constructor Description BitbucketClient(SSLTrustStoreProvider sslTrustStoreProvider)
-
Method Summary
-
-
-
Constructor Detail
-
BitbucketClient
public BitbucketClient(SSLTrustStoreProvider sslTrustStoreProvider)
-
-
Method Detail
-
getBitBucketUser
@Nullable public JsonUser getBitBucketUser(@NotNull String accessToken) throws IOException, AuthorizationFailedException
-
getBitBucketEmails
@Nullable public JsonEmails getBitBucketEmails(@NotNull String accessToken) throws IOException, AuthorizationFailedException
-
fetchRepositories
@NotNull public Collection<BitBucketRepository> fetchRepositories(@NotNull RefreshableToken token, @Nullable String vcsType) throws AuthorizationFailedException, RepositoryRequestFailedException
-
fetchRepositoriesPage
@NotNull public Pair<Collection<BitBucketRepository>,String> fetchRepositoriesPage(@NotNull RefreshableToken token, @Nullable String vcsType, @NotNull Map<String,String> parameters)
- Parameters:
parameters
- a map of key-value pairs, each added to the request URI as &key=value with value encoded to UTF-8.- Returns:
- pair consisting of a list of repositories and a url of the next page (or null if no next page).
-
fetchRepositoriesPage
@NotNull public Pair<Collection<BitBucketRepository>,String> fetchRepositoriesPage(@NotNull RefreshableToken token, @Nullable String vcsType, @NotNull String url)
- Returns:
- pair consisting of a list of repositories and a url of the next page (or null if no next page).
-
fetchRepository
@Nullable public BitBucketRepository fetchRepository(@NotNull RefreshableToken token, @NotNull String workspace, @NotNull String repoSlug) throws IOException
- Throws:
IOException
-
getUserWorkspaces
@NotNull public List<BitBucketWorkspace> getUserWorkspaces(@NotNull String token)
-
fetchOAuthToken
public BitbucketToken fetchOAuthToken(String clientId, String secret, String code, String redirectUrl) throws Exception
- Throws:
Exception
-
refreshToken
@NotNull public BitbucketToken refreshToken(String clientId, String secret, String refreshToken, String redirectUrl)
-
getUserApiUrl
@NotNull protected String getUserApiUrl()
-
getBitbucketOauthUrl
@NotNull public String getBitbucketOauthUrl()
-
getBitbucketApiUrl
protected String getBitbucketApiUrl()
-
-