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

@chadegushi/youzan_adapter

v1.1.1

Published

youzan api adapter

Downloads

13

Readme

转换有赞云sdk为有赞开放平台sdk调用方式

有赞开放平台sdk返回数据格式

  • 正确:{ "response": { } }
  • 错误:{ "error_response": { "code": 40010, "msg": "非法访问码" } }

有赞云sdk返回数据格式

  • 正确:{ "code": 200, "data": { }, "success": true, "message": "successful" }

  • 错误:{ "code": 135200013, "success": false, "message": "您的手机号尚未注册,请先注册" }

  • token错误:{ gw_err_resp: { err_code: 4203, err_msg: 'Token 不存在' } }

  • 还有原来类型的响应 { response } { error_response }

  • 有的接口数据不在data里,而是和code在同一级

调用方式,和原接口基本相同

    let YZClient = require('@chadegushi/youzan_adapter');
    let client = new YZClient(token, isGushishangcheng);  // isGushishangcheng 是否为故事商城接口调用的标志位, Boolean,缺省为false
    client.invoke('youzan.users.weixin.followers.pull', '3.0.0', 'GET', params)

备注

  • 增加debug模块,DEBUG=youzan node index
  • youzan.users.weixin.follower.gets 这个接口没有了,用youzan.users.weixin.follower.get实现
  • youzan.item.reviews.query 接口返回参数不规范,mcode mdata
  • youzan.scrm.customer.search 接口的分页参数变了,pag_no->page
  • youzan.scrm.customer.get 接口参数不需要JSON.stringify()了
  • youzan.datacenter.pssource.fetch 返回数据没有放在data里
  • youzan.datacenter.pspagesource.fetch 响应数据里没有分页信息了
  • youzan.ump.coupon.consume.fetchlogs.get 响应数据里open_user_id没值
  • youzan.ump.promocard.detail.get 响应数据里fans_type没有值

logs

  • 2021-4-25 增加故事商城的有赞接口调用模式:使用统一的有赞代理sdk(@chadegushi/youzanyun_ct)代替原有的youzanyun-sdk
  • 增加集成测试