oicojs

1.0.2 • Public • Published

OICO.js

A JSSDK for OICO project

Features

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

Installing

Using npm:

$ npm install oicojs --save

Example

Get information for your project:

import oico from 'oicojs'

oico.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:

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

Get all phaseId of your project sales:

oico.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:

oico.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 an OICO project

oico.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.

oico.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 oicojs

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

6.51 kB

Total Files

3

Last publish

Collaborators

  • mcwyc