Catalog npm
Back to packageRELEASE DETAILS

0.1.2

npm

3cplusv2-sdk-js

The 3cplus V2 js sdk

Published24 Jul 2018
Direct dependencies8
Transitive dependenciesNot calculated

README

Current package documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 8

Native requirements
8 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
axios
Environment
{
  "local_name": "axios",
  "alias": false,
  "peer_metadata": null
}
^0.18.0runtime
socket.io-client
Environment
{
  "local_name": "socket.io-client",
  "alias": false,
  "peer_metadata": null
}
^2.1.1runtime
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^5.1.0development
eslint-config-standard
Environment
{
  "local_name": "eslint-config-standard",
  "alias": false,
  "peer_metadata": null
}
^11.0.0development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
^2.13.0development
eslint-plugin-node
Environment
{
  "local_name": "eslint-plugin-node",
  "alias": false,
  "peer_metadata": null
}
^6.0.1development
eslint-plugin-promise
Environment
{
  "local_name": "eslint-plugin-promise",
  "alias": false,
  "peer_metadata": null
}
^3.8.0development
eslint-plugin-standard
Environment
{
  "local_name": "eslint-plugin-standard",
  "alias": false,
  "peer_metadata": null
}
^3.1.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-DyPgdXGKg+gLL/05gdsyMXJIRj9An7JJLb2ftYSOK5cwYzCIL02LXBvzXy7hvySgu7hpBIeDWpCWNR9+LXAcjQ==",
  "shasum": "2fc319eba07184a6c4f86dbe6b5533253ef621ee",
  "tarball": "https://registry.npmjs.org/3cplusv2-sdk-js/-/3cplusv2-sdk-js-0.1.2.tgz",
  "fileCount": 11,
  "unpackedSize": 49616,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVnTMCRA9TVsSAnZWagAABDUP/1p3InEpOFcpkLHM+yHL\n4wI1cqewyrS8rFv/wUsY7cY8MNN/fcBrBkRRTjxmk3TGbxq1yggsHNc5OKV5\niG4nqbP5wCfLg+U/pG7dtoP3gfpaQQgpn0MzFcykwdM2EJ/iuvmCCFWLkZ61\nRP4bWKGAozWz54aH4QTuJjWnetJepyBFBHjrYJRo3PFgEphTvnkSj/YqvLr9\n3aS9JCKbsOeqM7NoCYBlTGHGcp2oSSCXer13LXCdy03upwnv4rIocV/pHh9z\nekmqB0L8Fx97Tc3hg3QmUahpMb9SfdPFr0q5kCBLjIQoNlJ7kLeCqCmoDS06\ngb1Ma3qBhiY8zou9kLShXwCo+4tD0Jp5PnsfHG9pIot37DxzIrrtJoxFhhIZ\nUYJr0OTRl2LH6O5D8haR2xZU4EAmhEBjA2joVKzwvj6R2y8FeQWdhgvkJePk\nI0fZahkCkkEtKxoGAc0e1/2rOC/YsPnyW8QOwaf9pOPz8HhsoJKKCCg3u7jD\nj3aNNJ65K6mZiiXpdQO7hcCUOeTMkgJUl5blI5f8r94fdcyV3T9afhAhd07q\nXVEsYyQhRxUf/xiBi9XSnzh9sx91mz6xZakONaQOG6HfPmQ3iCkVxcvpXPbs\n74SqV6PRFPXxe6evQuuoj5LQxl48HaUNy3qDzV9XXYVskXZUMR+Q1y0MShyA\n6YX2\r\n=koo8\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQChQYJsHJta6ft5mbNwLpSyCYZCcrDds0cUFNynpi1w/wIhAPgo7DMKlUTIgIZKrYh1p0TUH8Pd/cBNGIKH95Avr1rW"
    }
  ]
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:a0bb97f33f5f3bd8908dc873afaffe5eccafee8a4b14b6226bedb626ae2b809c

Other collected versions

0.3.011 Nov0.2.928 Aug0.2.827 Aug0.2.727 Aug0.2.61 Aug0.2.531 JulView all collected versions →