Interface BitbucketAuthenticatedClient

All Superinterfaces:
AutoCloseable

public interface BitbucketAuthenticatedClient extends AutoCloseable
The implementation provides an authenticated client for a configured Bitbucket endpoint.
Since:
937.0.0
Author:
Nikolas Falco
API Note:
This interface is intended to be consumed in an extension point.
  • Method Details

    • getRepositoryOwner

      @NonNull String getRepositoryOwner()
      The owner of the repository where register the webhook.
    • getRepositoryName

      @CheckForNull String getRepositoryName()
      Name of the repository where register the webhook.
    • post

      String post(@NonNull String path, @NonNull String payload) throws IOException
      Perform an HTTP POST to the configured endpoint.

      Request will be sent as JSON

      Parameters:
      path - to call, it will prepend with the server URL
      payload - to send
      Returns:
      the JSON string of the response
      Throws:
      IOException - in case of connection failures
    • post

      default String post(@NonNull String path, @NonNull Object payload) throws IOException
      Throws:
      IOException
    • put

      String put(@NonNull String path, @NonNull String payload) throws IOException
      Perform an HTTP PUT to the configured endpoint.

      Request will be sent as JSON

      Parameters:
      path - to call, it will prepend with the server URL
      payload - to send
      Returns:
      the JSON string of the response
      Throws:
      IOException - in case of connection failures
    • put

      default String put(@NonNull String path, @NonNull Object payload) throws IOException
      Throws:
      IOException
    • delete

      String delete(@NonNull String path) throws IOException
      Perform an HTTP DELETE to the configured endpoint.

      Request will be sent as JSON

      Parameters:
      path - to call, it will prepend with the server URL
      Returns:
      the JSON string of the response
      Throws:
      IOException - in case of connection failures
    • get

      @NonNull String get(@NonNull String path) throws IOException
      Perform an HTTP GET to the configured endpoint.

      Request will be sent as JSON

      Parameters:
      path - to call, it will prepend with the server URL
      Returns:
      the JSON string of the response
      Throws:
      IOException - in case of connection failures
    • close

      void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException