0.3.0 • Published 3 years ago
3cplusv2-sdk-js v0.3.0
3Cplus SDK JS
A SDK used internally to contact the api and socket of the 3cplusv2 exposing a consistent and reusable interface.
Installation
yarn add 3cplusv2-sdk-js --save
Usage
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 for more info about the conventions of the request parameters, responses and errors.
0.3.0
3 years ago
0.2.9
5 years ago
0.2.8
5 years ago
0.2.7
5 years ago
0.2.6
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago