@fluentity/core
    Preparing search index...

    Interface AdapterInterface

    Interface for adapters that handle API communication. Adapters must implement methods for making HTTP requests and configuration.

    class CustomAdapter implements AdapterInterface {
    async call(queryBuilder: QueryBuilder): Promise<AdapterResponse> {
    // Make HTTP request
    }
    configure(options: Partial<AdapterOptions>): void {
    // Configure adapter
    }
    }
    interface AdapterInterface {
        options?: AdapterOptions;
        call(queryBuilder: QueryBuilder): Promise<AdapterResponse>;
        configure(options: Partial<AdapterOptions>): void;
    }

    Implemented by

    Index

    Properties

    Methods

    Properties

    options?: AdapterOptions

    The options for the adapter. Contains configuration settings specific to the adapter implementation.

    Methods

    • Makes an API request using the adapter's implementation.

      Parameters

      • queryBuilder: QueryBuilder

        The query builder containing request details

      Returns Promise<AdapterResponse>

      Promise resolving to the API response

      If the request fails

    • Configures the adapter with additional options.

      Parameters

      Returns void

      adapter.configure({
      baseURL: 'https://api.example.com',
      timeout: 5000
      });