<!-- 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

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[getSnippetConfig](./x-components.basexapi.getsnippetconfig.md)


</td><td>


</td><td>

() =&gt; [SnippetConfig](./x-components.snippetconfig.md)


</td><td>

Getter for the snippet config object.


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[addProductToCart(productId)](./x-components.basexapi.addproducttocart.md)


</td><td>


</td><td>

Tracks that a product was added to cart from PDP.


</td></tr>
<tr><td>

[close()](./x-components.basexapi.close.md)


</td><td>


</td><td>

Closes the Application.


</td></tr>
<tr><td>

[init(config)](./x-components.basexapi.init.md)


</td><td>


</td><td>

Initializes the Application passing the [SnippetConfig](./x-components.snippetconfig.md)<!-- -->.


</td></tr>
<tr><td>

[search(query)](./x-components.basexapi.search.md)


</td><td>


</td><td>

Searches the query parameter as user query.


</td></tr>
<tr><td>

[setInitCallback(initCallback)](./x-components.basexapi.setinitcallback.md)


</td><td>


</td><td>

Setter for the callback to call in the init method.


</td></tr>
<tr><td>

[setSnippetConfig(config)](./x-components.basexapi.setsnippetconfig.md)


</td><td>


</td><td>

Sets or updates the snippet config.


</td></tr>
</tbody></table>

