A simple SDK for scaffolding FPTU.tech projects.
Prerequisites: Node.js (>=6.x, 8.x preferred), npm version 3+ and Git.
$ npm install fptu-sdk
- Install yarn
npm install yarn -g
. - Clone project, run
yarn
andyarn build
, get filefptu-sdk.js
from/dist/
folder. - You may upload that javascript file to a CDN for later use.
- If you don't want to build you can use that file here:
https://cdn.jsdelivr.net/npm/fptu-sdk@[version,eg:1.0.2]/dist/fptu-sdk.js
- Add
<script src="fptu-sdk.js"></script>
to your index.html. - Deal with the
window.FPTUSDK
global, and you got the world!
Example:
const sdk = require("fptu-sdk");
// Get overview
sdk.overview.getOverview().then(data => console.log(data));