1.0.2 • Published 11 months ago

debox-open-sdk v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

DeBox Open SDK

DeBox Open SDK for Nodejs developers

English | 中文

Basic introduction

This project is the Nodejs programming interface of Debox social chat service (Chat Service) API, the encapsulation and implementation of Chat Service Rest API, to help Nodejs developers program and use Debox's chat message service faster.

For detailed API interface and meaning, please refer to: https://docs.debox.love

Getting Started

Open platform provides Nodejs language version SDK (Software Development Kit)

Nodejs SDK encapsulates all API interfaces of DeBox services, and you can easily call all API interfaces of related services through Nodejs SDK.

  1. Intall debox-open-sdk.
npm i debox-open-sdk

# or
pnpm add debox-open-sdk

# or
yarn add debox-open-sdk
  1. Once you install debox-open-sdk You need to be clear whether you use commonjs or es modules. This SDK supports both, you can refer to the following example to use.
// Commonjs
const { Client } = require('debox-open-sdk')

// ES modules
import { Client } from 'debox-open-sdk'
  1. Next, you can initialize a client instance with your api key and some custom configurations
const data = new Client({
	endpoint: 'https://open.debox.pro',
	apiKey: 'your-api-key',
})
  1. The following APIs are currently supported, and more functions will be added in the future.
  • Register callback address
const res = await data.sendChatMsg({
  registerUrl: 'your receive message url address'
  httpMethod: 'your receive message http method'
})
  • send conversation message
const res = await data.sendChatMsg({
	toUserId: '',
	groupId: 'groupId',
	message: 'Hello World',
})
  • get groupId
const res = await data.getGroupId({
	inviteUrl: 'https://debox.site/group/00021pru',
})
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

1 year ago