funicojs

1.1.5 • Public • Published

FUNICO.js

A JSSDK for FUNICO project

Features

Get information for your FUNICO project and use them to describe your FUNICO project.

Installing

Using npm:

$ npm install funicojs --save

Example

Get information for your project:

import funico from 'funicojs'
 
funico.getProjectInfo((data)=>{
  console.log(data)
  // If success, you will see your project information in console.
}))
 

Usage

You can import this module to your web project. If you can't use import, you can download this module and import it with script tag:

<script src="./index.js"></script>

Get information for your project:

funico.getProjectInfo((data)=>{
  console.log(data)
  // If success, you will see your project information in console.
}))

Get all phaseId of your project sales:

funico.getAllPhase(projectName, (data)=>{
  console.log(data)
  // projectName is the name of your project, if success, you will get an array of all phaseId
  // phaseId is an ID of a sale phase
  // phaseId would like: BNCapital_{projectName}_Sale_{phase}
  // For example: BNCapital_XXX_Sale_1
})

Get information for target phase:

funico.getPhaseInfo(phaseId, (data)=>{
  console.log(data)
  // If success, you will see target phase information in console.
}))

Get statistical data for your present phase, you should send pId as a parameter to this method.

Notice: pId is not phaseId, you will get a pId if you have a FUNICO project

funico.getPhaseStat((pId, data)=>{
  console.log(data)
  // If success, you will see your statistical data in console.
}))

Get all phase information for your project. It is recommended to get phase information by getPhaseInfo, because this method may cost too much network resources.

funico.getAllPhaseInfo(projectName, (data)=>{
  console.log(data)
  // If success, you can get all phase information. If fail, you will get an object like: {error: "NotFound!"}
})

Readme

Keywords

Package Sidebar

Install

npm i funicojs

Weekly Downloads

9

Version

1.1.5

License

ISC

Unpacked Size

6.27 kB

Total Files

3

Last publish

Collaborators

  • mcwyc