# 3cplusv2-sdk-js

> The 3cplus V2 js sdk

Latest version **0.3.0** (published 2020-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install 3cplusv2-sdk-js
pnpm add 3cplusv2-sdk-js
yarn add 3cplusv2-sdk-js
bun add 3cplusv2-sdk-js
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2020-11-11 |
| First published | 2018-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 4.9 MB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Mauri de Souza Nunes |
| Maintainers | mauri870 |

## Links

- npm: https://www.npmjs.com/package/3cplusv2-sdk-js
- npm.io page: https://npm.io/package/3cplusv2-sdk-js

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [jssip](https://npm.io/package/jssip.md) ^3.3.6
- [events](https://npm.io/package/events.md) ^3.2.0
- [isomorphic-ws](https://npm.io/package/isomorphic-ws.md) ^4.0.1
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.2.0

## Recent versions

- 0.3.0 (latest) — 2020-11-11
- 0.2.9 — 2019-08-28
- 0.2.8 — 2019-08-27
- 0.2.7 — 2019-08-27
- 0.2.6 — 2019-08-01
- 0.2.5 — 2019-07-31
- 0.2.4 — 2019-05-24
- 0.2.3 — 2019-04-25
- 0.2.2 — 2019-04-25
- 0.2.1 — 2019-03-18
- 0.2.0 — 2019-02-04
- 0.1.9 — 2018-10-26
- 0.1.8 — 2018-10-24
- 0.1.7 — 2018-10-05
- 0.1.6 — 2018-09-21
- … 5 more at https://npm.io/package/3cplusv2-sdk-js/versions

## README

# 3Cplus SDK JS

A SDK used internally to contact the api and socket of the 3cplusv2 exposing a consistent and reusable interface.

## Installation

```bash
yarn add 3cplusv2-sdk-js --save
```

## Usage

```js
import TcSDK from '3cplusv2-sdk-js'

// The constructor receives the same options as axios.create
const sdk = new TcSDK({
  baseURL: "https://app.3c.fluxoti.com"
})
.v1()
.withAuth('your_api_token_here')
.socket('https://socket.3c.fluxoti.com')

# Http Api
sdk.user().me()
.then((response) => console.log(response.data))
.catch((err) => console.log(err.response.data))

# Realtime integration
const socket = sdk.realtime().integration()

socket.on('connect', (event) => console.log('Listening for events'))
socket.on('integration', (event) => console.log(event))
socket.on('error', (err) => console.log(err))
```

All available api endpoints are under `.vX()`, separated by sections. Each method return an axios promise.

Please refer to the [Api Documentation](http://api-docs.3c.fluxoti.com) for more info about the conventions of the request parameters, responses and errors.

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