npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ant-basement/ant-biz-service

v0.0.1-alpha.2

Published

Ant OpenAPI JavaScript API Baas

Downloads

13

Readme

Ant OpenAPI JavaScript API Baas

一、说明

该 SDK 的前缀统一是:basement.ant

基本结构是:basement.ant.<分类>.<业务标识>.<具体方法>

二、API

1. 通用基础能力

  • basement.ant.base.image.upload

描述:上传图片 示例如下:

basement.ant.base.image.upload({
  fileName: '图片名称.jpg',
  filePath: '/tmp/image.jpg',
})
  • basement.ant.base.video.upload

描述:上传视频 示例如下:

basement.ant.base.video.upload({
  fileName: '视频名称.jpg',
  filePath: '/tmp/video.mp4',
})

2. 小程序能力

  • basement.ant.mini.identification.queryCertifyzhub

描述:刷脸认证 示例如下:

basement.ant.mini.identification.queryCertifyzhub({
  bizId: '5456897876546767654', // 商户请求的唯一标识
  zimId: '731be7f204a962b0486a9b64ea3050ae', // 刷脸认证的唯一标识
  faceType: 1, // 匿名注册: 1, 匿名认证: 2, 实名认证: 3
  needImg: false,
})
  • basement.ant.mini.identification.queryUserWeb

描述:人脸采集 示例如下:

basement.ant.mini.identification.queryUserWeb({
  bizId: '5456897876546767654',
  zimId: '731be7f204a962b0486a9b64ea3050ae',
  externParam: {}, // 选填,扩展参数,必须是合法的 json 对象
})
  • basement.ant.mini.qrcode.create

描述:生成小程序二维码 示例如下:

basement.ant.mini.qrcode.create({
  urlParam: 'page/component/component-pages/view/view',
  queryParam: 'x=1',
  describe: '二维码描述',
})
  • basement.ant.mini.templateMessage.send

描述:发送模版消息 示例如下:

basement.ant.mini.templateMessage.send({
  toUserId: '',
  formId: '',
  userTemplateId: '',
  page: '', // 小程序的跳转页面, page/component/index
  data: '', // 模板消息中的自定义部分
})

// 入参中 data 示例
data = JSON.stringify({
  "keyword1": {
    "value": "12:00"
  },
  "keyword2": {
    "value": "20180808"
  },
  "keyword3": {
    "value": "支付宝"
  }
})
  • basement.ant.mini.risk.detectContent

描述:文本内容风险识别 示例如下:

basement.ant.mini.risk.detectContent({
  content: '需要识别的文本'
})

三、API 响应结果

  • 请求正常
{
  success: true|false,
  requestId: '', // 请求的标识 id,用于定位问题
  result: {}, // 内容对象
}
  • 请求异常
{
  name: 'BaasError',
  message: '',
  code: '',
  type: '',
}