<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [BaseXAPI](./x-components.basexapi.md)

## BaseXAPI class

Default implementation for [XAPI](./x-components.xapi.md)<!-- -->.

**Signature:**

```typescript
export declare class BaseXAPI implements XAPI 
```
**Implements:** [XAPI](./x-components.xapi.md)

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [getSnippetConfig](./x-components.basexapi.getsnippetconfig.md) |  | () =&gt; [SnippetConfig](./x-components.snippetconfig.md) | Getter for the snippet config object. |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [addProductToCart(productId)](./x-components.basexapi.addproducttocart.md) |  | Tracks that a product was added to cart from PDP. |
|  [close()](./x-components.basexapi.close.md) |  | Closes the Application. |
|  [init(config)](./x-components.basexapi.init.md) |  | Initializes the Application passing the [SnippetConfig](./x-components.snippetconfig.md)<!-- -->. |
|  [search(query)](./x-components.basexapi.search.md) |  | Searches the query parameter as user query. |
|  [setInitCallback(initCallback)](./x-components.basexapi.setinitcallback.md) |  | Setter for the callback to call in the init method. |
|  [setSnippetConfig(config)](./x-components.basexapi.setsnippetconfig.md) |  | Sets or updates the snippet config. |

