Package org.azd.utils

Class Client


@Deprecated public abstract class Client extends BaseClient
Deprecated.
This is deprecated as of version 5.0.0
Wrapper class to build request url and to call Azure DevOps REST API
  • Constructor Details

    • Client

      public Client()
      Deprecated.
  • Method Details

    • send

      @Deprecated public static String send(RequestMethod requestMethod, Connection connection, String resourceId, String project, String area, String id, String resource, String apiVersion, Map queryString, boolean contentType, String body) throws AzDException
      Deprecated.
      Request the Azure DevOps REST API and builds the request url dynamically based on resource id and endpoints passed.
      Parameters:
      requestMethod - type of request GET, POST, PATCH, DELETE RequestMethod
      connection - name of the organization
      resourceId - pass the resource id.
      project - name of the project
      area - resource area
      id - resource id
      resource - resource area endpoint
      apiVersion - api version
      queryString - query string to append the url
      contentType - true to return the request url
      body - body of the request to post and patch
      Returns:
      String response from API
      Throws:
      AzDException - throws user understandable error message with error code from API
    • send

      @Deprecated public static InputStream send(RequestMethod requestMethod, Connection connection, String resourceId, String project, String area, String id, String resource, String apiVersion, HashMap<String,Object> queryString, String contentType, InputStream contentStream, Map<String,String> customHeaders, boolean redirect) throws AzDException
      Deprecated.
      Request the Azure DevOps REST API and builds the request url dynamically based on resource id and endpoints passed
      Parameters:
      requestMethod - type of request GET, POST, PATCH, DELETE RequestMethod
      connection - name of the organization
      resourceId - pass the resource id.
      project - name of the project
      area - resource area
      id - resource id
      resource - resource area endpoint
      apiVersion - api version
      queryString - query string to append the url
      contentType - true to return the request url
      contentStream - API payload as stream
      customHeaders - Custom headers if any
      redirect - if true looks for redirect URI from HttpResponse
      Returns:
      InputStream from API
      Throws:
      AzDException - Default Api exception handler
    • send

      @Deprecated public static String send(RequestMethod requestMethod, Connection connection, String resourceId, String project, String area, String id, String resource, String apiVersion, Map<String,Object> queryString, Map<String,Object> body) throws AzDException
      Deprecated.
      Request the Azure DevOps REST API and builds the request url dynamically based on resource id and endpoints passed
      Parameters:
      requestMethod - type of request GET, POST, PATCH, DELETE RequestMethod
      connection - connection object
      resourceId - pass the resource id.
      project - name of the project
      area - resource area
      id - resource id
      resource - resource area endpoint
      apiVersion - api version
      queryString - query string to append the url
      body - body of the request to post and patch
      Returns:
      String response from API
      Throws:
      AzDException - throws user understandable error message with error code from API
    • send

      @Deprecated public static String send(RequestMethod requestMethod, Connection connection, String resourceId, String project, String area, String id, String resource, String apiVersion, Map<String,Object> queryString, Map<String,Object> body, String contentType) throws AzDException
      Deprecated.
      Request the Azure DevOps REST API and builds the request url dynamically based on resource id and endpoints passed
      Parameters:
      requestMethod - type of request GET, POST, PATCH, DELETE RequestMethod
      connection - connection object
      resourceId - pass the resource id.
      project - name of the project
      area - resource area
      id - resource id
      resource - resource area endpoint
      apiVersion - api version
      queryString - query string to append the url
      body - body of the request to post and patch
      contentType - content type to pass in the request header
      Returns:
      String response from API
      Throws:
      AzDException - throws user understandable error message with error code from API
    • send

      @Deprecated public static String send(RequestMethod requestMethod, Connection connection, String resourceId, String project, String area, String id, String resource, String apiVersion, Map<String,Object> queryString, Map<String,Object> body, List<Object> requestBody, String contentType) throws AzDException
      Deprecated.
      Request the Azure DevOps REST API and builds the request url dynamically based on resource id and endpoints passed
      Parameters:
      requestMethod - type of request GET, POST, PATCH, DELETE RequestMethod
      connection - connection object
      resourceId - pass the resource id.
      project - name of the project
      area - resource area
      id - resource id
      resource - resource area endpoint
      apiVersion - api version
      queryString - query string to append the url
      body - body of the request to post and patch
      requestBody - body of the request to post and patch. This should be a list of HashMap
      contentType - content type to pass in the request header
      Returns:
      String response from API
      Throws:
      AzDException - throws user understandable error message with error code from API
    • getLocationUrl

      @Deprecated public static String getLocationUrl(String resourceID, String organizationName) throws AzDException
      Deprecated.
      Gets the resource area url based on resource id passed for the organization
      Parameters:
      resourceID - pass the resource id
      organizationName - pass the organization name
      Returns:
      resource area url
      Throws:
      AzDException - throws user understandable error message with error code from API