# Introdução

Essa biblioteca foi feita com o intuito de facilitar a utilização dos dispositivos da Wavoip por meio de websockets. Ela abstrai toda comunicação de eventos entre o cliente e o dispositivo, além de toda parte de áudio de chamadas

Como a comunicação de websockets se dá por meio de eventos, a biblioteca foi feita para ser utilizada por meio callbacks.

## Instalação

Instale a biblioteca utilizando seu gerenciador de dependências favorito

{% tabs %}
{% tab title="PNPM" %}

```bash
pnpm add @wavoip/wavoip-api
```

{% endtab %}

{% tab title="NPM" %}

```bash
npm install @wavoip/wavoip-api
```

{% endtab %}
{% endtabs %}

## Classe Wavoip

Instancie a classe Wavoip e passe os tokens de seus dispositivos como parâmetros

{% hint style="info" %}
É possível adicionar ou remover tokens de dispositivos após a classe ser instanciada&#x20;
{% endhint %}

```typescript
import { Wavoip } from "@wavoip/wavoip-api"

const wavoip = new Wavoip({
    tokens: ["token 1", "token 2", ...]
})
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wavoip.gitbook.io/api/wavoip-api/comece-aqui/introducao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
