# @whoiswhere/sdk

> whoiswhere Javascript SDK

Latest version **1.0.4** (published 2023-10-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @whoiswhere/sdk
pnpm add @whoiswhere/sdk
yarn add @whoiswhere/sdk
bun add @whoiswhere/sdk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-10-06 |
| First published | 2023-10-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Institut de la Statistique et des Études Économiques |
| Maintainers | isee_dev |

## Links

- npm: https://www.npmjs.com/package/@whoiswhere/sdk
- npm.io page: https://npm.io/package/@whoiswhere/sdk

## Recent versions

- 1.0.4 (latest) — 2023-10-06
- 1.0.3 — 2023-10-05
- 1.0.2 — 2023-10-05
- 1.0.1 — 2023-10-05
- 1.0.0 — 2023-10-05

## README

# @whoiswhere/SDK

## Overview

`@whoiswhere/SDK` is a real-time user and application monitoring package designed to be integrated into web applications. Easily track which users are currently connected to which applications using WebSocket technology.

> Note: This SDK is part of the `@whoiswhere` suite, which will later include `@whoiswhere/server`.

## Installation

To install the package, simply run:

```bash
npm install @whoiswhere/sdk
```

## Usage

To use the SDK, you need to import it into your web application and call the `connectWebSocket` function:

### Importing

```javascript
import connectWebSocket from '@whoiswhere/sdk';
```

### Initialize WebSocket Connection

To initialize a WebSocket connection, use the `connectWebSocket` function.

```javascript
import { useEffect } from 'react';
import connectWebSocket from '@whoiswhere/sdk';

const MyApp = () => {
  useEffect(() => {
    const user = 'userName';
    const appIdentifier = 'YourAppIdentifier';
    const wsHost = 'ws://your-websocket-host';
    connectWebSocket(user, appIdentifier, wsHost);
  }, []);

  return (
    <div>
      {/* Your application */}
    </div>
  );
};
```

## Contributions

Contributions to improve the SDK are welcome. Please make sure to read the contributing guide before making a pull request.

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/@whoiswhere/sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
