SDK for querying Branches & ATMs from WebApi of Česká spořitelna a.s.
npm install cs-places-sdkTransparentAcc SDK has a peer dependency on CSCoreSDK.
If you just want to use the SDK, there are compiled files ready to be used in the /dist folder.
You can just copy these files directly from the repository or preferably, use npm to install it into your project:
```
npm install cs-core-sdk --save
npm install cs-places-sdk --save
folder:
* cs-places-sdk.sfx.js - CSPlacesSDK packaged for browsers
* cs-places-sdk.sfx.d.ts - CSPlacesSDK typings for browsers
* cs-places-sdk.sfx.js.map - CSPlacesSDK sourcemap for browsersInclude the
cs-core-sdk.sfx.js from CSCoreSDK in your page before the cs-places-sdk.sfx.js:`html
`The Places SDK will be available in global variable
CSPlacesSDK.IMPORTANT! CSAS SDKs depend on a native ES6 Promise implementation to be supported.
If your environment doesn't support ES6 Promises, you can polyfill.
Usage in node
For usage in node, install it through npm (see above). You can then require it by:
`javascript
var CSPlacesSDK = require('cs-places-sdk');
`
Configuration
Before using any CSAS SDKs in your application, you need to initialize CSCoreSDK by providing it your WebApiKey.
`javascript
CSCoreSDK.useWebApiKey( "YourApiKey" )
//Get the places client
var placesClient = CSPlacesSDK.getClient();
`
See CoreSDK configuration guide for all the available configuration options.Usage Guide
See Usage Guide for usage instructions.Development
The SDK itself is written in TypeScript, packaged by webpack, tested by jasmine & karma and distributed thorugh npm. It uses tsd for TypeScript definitions.In order to to develop upon this SDK, you will need the following installed globally:
*
node & npm
* webpack - For packaging
* karma - For testing
* tsd - For downloading typescript definitionsSetup
After cloning the repo, run the following command to initialize the repository for development:`
npm install && tsd install
`You can verify everything worked as expected by running:
`
npm test
`Directory structure
This project uses the following directory structure:*
dist - Packaged version of this SDK ready for use.
* build - Build artifacts (not checked in repository)
* lib - The SDK itself
* spec - Tests for the SDK
* typings - Typings used by the SDK
* tooling - Commands for building and packagingDevelopment commands
*
npm run clean - cleans build and dist folders
* npm run build - performs clean and builds the SDK into bulid folder. It also generates .d.ts files using generate-tsd command.
* npm run dist - performs build command and copies the packaged SDK files into dist folder
* npm run test - performs build and runs tests in node and browser.
* npm run test-browser - performs tests only in browser
* npm run test-node - performs tests only in node
* npm version [major|minor|patch]` - releases new version of the SDK. Requires write access to repository. See npm-version for more details.Please read our contribution guide to learn how to contribute to this project.