@opencord/client
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

Official Opencord Plugin SDK for JavaScript

NPM version NPM downloads License

📦 Installation

$ npm install --save @opencord/client
# or
$ yarn add @opencord/client

⚙️ Initialization

import { getClient } from '@opencord/client';

const oc = getClient();

💡 Usage

The OpencordClient provides a set of methods for accessing the SDK's features.

For example, you can use the getCode() method to retrieve the authorization code.

const { code, message, data } = await oc.getCode();

if (code === 200) {
  console.log('✅ Get authorization code successed', data);
} else {
  console.log('❌ Get authorization code failed.', code, message);
}

📚 Documentation

See: https://developers.opencord.xyz/

Package Sidebar

Install

npm i @opencord/client

Weekly Downloads

1

Version

0.0.10

License

MIT

Unpacked Size

29.9 kB

Total Files

36

Last publish

Collaborators

  • zhiweitao
  • lumos.zyx
  • opencord-developer