getDomainSearchWithHttpInfo method

Future<Response> getDomainSearchWithHttpInfo(
  1. String q, {
  2. String? tld,
})

Finds names built from the keyword q, plus the registrar's alternate-TLD suggestions, and answers a quote for each: the name, whether it is purchasable, whether it is premium, the first-term and renewal price in cents, and the TLD.

Finds names built from the keyword q, plus the registrar's alternate-TLD suggestions, and answers a quote for each: the name, whether it is purchasable, whether it is premium, the first-term and renewal price in cents, and the TLD. Prices are RETAIL — this deployment's markup is already applied and the wholesale cost is never on the wire. It requires a validated principal; 403 without one. Nothing is charged and nothing is held — a quote is not a reservation, and the price is re-quoted at purchase, so a name quoted here can be gone or dearer by the time you buy it. A deployment with no registrar credentials answers 503.

Note: This method returns the HTTP Response.

Parameters:

  • String q (required): Q is the keyword to build names from. It is required.

  • String tld: TLD narrows the search to a comma-separated set of top-level domains.

Implementation

Future<Response> getDomainSearchWithHttpInfo(String q, { String? tld, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/domain/search';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

    queryParams.addAll(_queryParams('', 'q', q));
  if (tld != null) {
    queryParams.addAll(_queryParams('', 'tld', tld));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}