Class BlobsRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.blobs.BlobsRequestBuilder

public class BlobsRequestBuilder extends BaseRequestBuilder
Request builder to manage Git blobs Api.
  • Constructor Details

    • BlobsRequestBuilder

      public BlobsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • getAsync

      public CompletableFuture<GitBlobRef> getAsync(String repositoryId, String sha1) throws AzDException
      Get a single blob.
      Parameters:
      repositoryId - The name or ID of the repository.
      sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
      Returns:
      GitBlobRef Object GitBlobRef
      Throws:
      AzDException - Default Api Exception handler.
    • getAsync

      public CompletableFuture<InputStream> getAsync(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get a single blob.
      Parameters:
      repositoryId - The name or ID of the repository.
      sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      Input stream.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsZipAsync

      public CompletableFuture<InputStream> getAsZipAsync(String repositoryId, List<String> blobIds) throws AzDException
      Gets one or more blobs in a zip file download.
      Parameters:
      repositoryId - The name or ID of the repository.
      blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsZipAsync

      public CompletableFuture<InputStream> getAsZipAsync(String repositoryId, List<String> blobIds, String filename) throws AzDException
      Gets one or more blobs in a zip file download.
      Parameters:
      repositoryId - The name or ID of the repository.
      blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
      filename - Specify the file name to get in a zip file.
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public GitBlobRef get(String repositoryId, String sha1) throws AzDException
      Get a single blob.
      Parameters:
      repositoryId - The name or ID of the repository.
      sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
      Returns:
      GitBlobRef Object GitBlobRef
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public InputStream get(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get a single blob.
      Parameters:
      repositoryId - The name or ID of the repository.
      sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      Input stream.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsZip

      public InputStream getAsZip(String repositoryId, List<String> blobIds) throws AzDException
      Gets one or more blobs in a zip file download.
      Parameters:
      repositoryId - The name or ID of the repository.
      blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsZip

      public InputStream getAsZip(String repositoryId, List<String> blobIds, String filename) throws AzDException
      Gets one or more blobs in a zip file download.
      Parameters:
      repositoryId - The name or ID of the repository.
      blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
      filename - Specify the file name to get in a zip file.
      Throws:
      AzDException - Default Api Exception handler.