0.0.1 • Published 8 years ago
cot-javascript-api-sdk v0.0.1
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
- Install all the dependencies
- Run
yarn install(recommended) ornpm installto get the project's dependencies - Run
yarn buildornpm run buildto produce minified version of your library and to run the tests at the same time.
- Development mode
- Having all the dependencies installed run
yarn devornpm 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.
- Running the tests
- Run
yarn testornpm run test
Scripts
yarn buildornpm run build- produces production version of your library under thelibfolderyarn devornpm run dev- produces development version of your library and runs a watcheryarn testornpm run test- well ... it runs the tests :)yarn test:watchornpm run test:watch- same as above but in a watch mode
Use of the library
- Build the library using
yarn buildornpm run build. - Copy the
library.min.jsin 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).
0.0.1
8 years ago