ipushpull-js
TypeScript icon, indicating that this package has built-in type declarations

3.0.8 • Public • Published

ipushpull javascript api

Install

npm install ipushpull-js

Usage

import ipushpull from 'ipushpull-js';
import { IPageService } from 'ipushpull-js/dist/Page/Page';

ipushpull.config.set({
    api_url: "https://test.ipushpull.com/api",
    api_version: "2.0",
    ws_url: "https://test.ipushpull.com",
    web_url: "https://test.ipushpull.com",
    docs_url: "https://docs.ipushpull.com",
    storage_prefix: "ipp_local",
    api_key: "???",
    api_secret: "???",
    transport: "polling",
    hsts: false, // strict cors policy
});

let page: IPageService = new ipushpull.Page([page id|name], [folder id|name]);

page.on(page.EVENT_READY, () => {
    console.log("EVENT_READY");
    console.log("page data", page.data);
    console.log("page content", page.Content.current);
});

page.on(page.EVENT_NEW_CONTENT, (data) => {
    console.log("EVENT_NEW_CONTENT", data);
    console.log("EVENT_NEW_CONTENT", data.diff);
});

Demo

See ./build/index.html

Development

webpack --watch --config webpack.dev.js

Build

tsc
npm run prod

Documentation

# Install the global CLI
npm install --global typedoc

#Execute typedoc on your project
typedoc --out docs ./src

Readme

Keywords

none

Package Sidebar

Install

npm i ipushpull-js

Weekly Downloads

80

Version

3.0.8

License

ISC

Unpacked Size

21 MB

Total Files

469

Last publish

Collaborators

  • ipp_jake
  • ippkyle