0.0.1 • Published 6 years ago

cot-javascript-api-sdk v0.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

Capital On Tap public API - Javascript SDK

Javascript SDK to use with the Capital On Tap public API.

Features

  • Webpack 3 based.
  • ES6 as a source.
  • Exports in a umd format so your library works everywhere.
  • ES6 test setup with Mocha and Chai.
  • Linting with ESLint.

Getting started

  1. Install all the dependencies
  • Run yarn install (recommended) or npm install to get the project's dependencies
  • Run yarn build or npm run build to produce minified version of your library and to run the tests at the same time.
  1. Development mode
  • Having all the dependencies installed run yarn dev or npm run dev. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.
  1. Running the tests
  • Run yarn test or npm run test

Scripts

  • yarn build or npm run build - produces production version of your library under the lib folder
  • yarn dev or npm run dev - produces development version of your library and runs a watcher
  • yarn test or npm run test - well ... it runs the tests :)
  • yarn test:watch or npm run test:watch - same as above but in a watch mode

Use of the library

  • Build the library using yarn build or npm run build.
  • Copy the library.min.js in your library folder.
  • Start using the library using import Client from './library/library.min.js'.
  • Create a Client object using let client = new Client(clientId, apiKey);.
  • Connect to a customer account using client.login(username, password).