2.3.35 • Published 2 years ago

apppot-sdk v2.3.35

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
2 years ago

AppPot SDK for JavaScript

NPM

npm version

AppPot SDK for JavaScript, available for browsers and smart devices, or Node.js.

How to Use

install

To use the SDK in the browser, add the following script tag to your HTML page

<script src="https://cdn.rawgit.com/NCDCHub/apppot-sdk-js/v2.3/dist/apppot.min.js"></script>

To use in the Node.js, use the npm package manager. Type the following into a terminal.

npm install apppot-sdk

configure

As follows, configure the connection destination and apps information like following. (url, appId, appKey, appVersion, companyId and groupId should be set a value corresponding to the environment.)

var window.AppPot = AppPotSDK.getService({
  url: 'http://example.com/apppot/',
  appId: 'apppot-test-app',
  appKey: '1234567890abcdef1234567890abcdef',
  appVersion: '1.0.0',
  companyId: 1,
  groupId: 1
});

define models

Define models for your App.

window.Models = {
  Customer: AppPot.defineModel('Customer', {
    'name': {
      type: AppPot.DataType.Varchar
    },
    'address': {
      type: AppPot.DataType.Varchar,
      length: 255
    },
    'age': {
      type: AppPot.DataType.Long
    },
    'birthday': {
      type: AppPot.DataType.DateTime
    },
    'isHuman': {
      type: AppPot.DataType.Bool
    }
  }),
  Item: AppPot.defineModel('Item', {
    'name': {
      type: AppPot.DataType.Varchar
    },
    'description': {
      type: AppPot.DataType.Varchar
    },
  }),
  ...
};

create database

Create DataBase for your App.

AppPot.createDatabase(Object.values(window.Models))
  .then(()=>{
    console.log('database is created!!');
  });

Other API or usage

You can find a documents at:
http://docs.apppot.jp/apppot/index.html

License

This SDK is distributed under the Apache License, Version 2.0

2.3.35

2 years ago

2.3.34

2 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.3.33

6 years ago

2.3.32

6 years ago

2.3.31

6 years ago

2.3.30

6 years ago

2.3.29

6 years ago

2.3.28

7 years ago

2.3.27

7 years ago

2.3.26

7 years ago

2.3.25

7 years ago

2.3.24

7 years ago

2.3.23

7 years ago

2.3.22

7 years ago

2.3.21

7 years ago

2.3.20

7 years ago

2.3.19

7 years ago

2.3.18

7 years ago

2.3.17

7 years ago

2.3.16

7 years ago

2.3.15

7 years ago

2.3.14

7 years ago

2.3.13

7 years ago

2.3.12

7 years ago

2.3.11

7 years ago

2.3.10

7 years ago

2.3.9

7 years ago

2.3.8

7 years ago

2.3.7

7 years ago

2.3.6

7 years ago

2.3.5

8 years ago

2.3.4

8 years ago

2.3.3

8 years ago