
Product
Unify Your Security Stack with Socket Basics
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
@chatopera/node-dscrm
Advanced tools
大盛 CRM,精致好用的 CRM 系统。
npm install -i @chatopera/node-dscrm
const Dscrm = require("@chatopera/node-dscrm");
const client = new Dscrm("YOUR_SERVER_BASE_URL",
{grant_type: "client_credentials",
client_id: "YOUR_CLIENT_ID",
client_secret: "YOUR_CLIENT_SECRET"},
XDEBUG_SESSION_START)
其中,YOUR_SERVER_BASE_URL
/YOUR_CLIENT_ID
/YOUR_CLIENT_SECRET
是实例 URL 地址,客户端认证 ID 和密钥,以上为必须参数;XDEBUG_SESSION_START
是可选参数,作为 xdebug
调试用的 session,默认为 null
时 Server 不进行断点调试。
调用 API 有两种形式,一种是 SDK 已经实现了明确的方法名的;一种是 SDK 没有实现明确方法名,但是大盛 CRM 中已经有了 RestAPI 的。
let resp = await client.getCurrentUser();
await client.command(METHOD, PATH, BODY)
其中,METHOD
可以是 "GET", "POST", "PUT", "DELETE" 等;PATH
是服务基础 URL 追加的部分,比如/Api/V8/user-preferences/1
, 可以携带有params或queryString
; BODY
,发送请求的 JSON 数据。
示例
let ret = await client.command("GET", "/Api/V8/user-preferences/1");
为明确的方法名使用参考 SuiteCRM/api/routes.php。
不同 API 返回的结果都是一个 JSONObject,带有返回的数据。
如果请求出现异常,会抛出Error
,建议用 Try/Catch 获取。
npm i
cp sample.env .env # edit .env with your credentials
npm test
Copyright (2018-2020) 北京华夏春松科技有限公司
FAQs
大盛 CRM nodejs client
We found that @chatopera/node-dscrm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.
Research
/Security News
The Socket Threat Research Team uncovered a coordinated campaign that floods the Chrome Web Store with 131 rebranded clones of a WhatsApp Web automation extension to spam Brazilian users.