@edgeros/web-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

logo

🔥 文档网站

SDK Introduction

EdgerOS Web-SDK is a front-end development kit that provides various interactive interfaces for the front end of EdgerOS App, and the front end of EdgerOS App correctly uses Web-SDK.

EdgerOS Web-SDK supports both JavaScript and TypeScript development.

npm install

you can use command: npm i @edgeros/web-sdk to install EdgerOS Web-SDK.

  • TypeScript
import '@edgeros/web-sdk'
  • JavaScript
<script src="\\PATH/sdk.min.js"></script>

Test

After the @edgeros/web-sdk module is correctly import, the browser window object will contain the edger member:

console.log(window.edger); // Web-SDK object show

Style

Most Web-SDK functions return Promise objects, for example, the following function obtains the Web-SDK version:

edger.version().then(data => {
	console.log('Version:', data.version);
}).catch(error => {
	console.error(error);
});

Web-SDK functions

Security

  • App front-end and back-end secure communication specifications See details: Security

State & gestures

  • Front-end state and gestures. See details: State

Account

  • Web-SDK provides information about users who are currently accessing EdgerOS device. See details: Account

Notify

  • App calls this interface to pop up system notify information. See details: Notify

Permission

  • App front end can obtain and check related permissions by using these functions. See details: Permission

Share

  • Apps can share messages with each other by using these functions. See details: Share

Network

  • These functions provide current EdgerOS device network working information. See details: Network

Language

  • App can get EdgerOS current language information. See details: Language

Theme

  • Get the current display theme of EdgerOS, the App can dynamically select its own display style according to the theme information. See details: Theme

Orientation

  • Obtain and control the current display orientation of EdgerOS. See details: Orientation

Mobile

  • Operate current mobile functions, such as camera, etc. See details: Mobile

AcoPay

  • EdgerOS online payment system 翼辉支付. This payment system uses WeChat Pay or Alipay payment channels. App can use this payment system to complete on-site payments. See details: AcoPay

SafeArea

  • EdgerOS App can get current safeArea information. SafeArea

Download

  • EdgerOS provides download function. See details: Download

Filesystem

  • EdgerOS provides filesystem function. See details: Filesystem

Package Sidebar

Install

npm i @edgeros/web-sdk

Weekly Downloads

13

Version

1.2.1

License

MIT

Unpacked Size

365 kB

Total Files

252

Last publish

Collaborators

  • clarkttfu
  • fu-starslights
  • epmbot
  • xieyuanbin
  • chengyonbin