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

taobao-openapi

v1.4.3

Published

api client for taobao open platform

Downloads

20

Readme

taobao-openapi

淘宝开放平台SDK,用于node平台

Install

npm install taobao-openapi --save

Examlpe

var Taobao = require("taobao-openapi");

var top = new Taobao({
    app_key: "yourAppKey",
    app_secret: "yourAppSecret"
});

top.get("taobao.shop.get", {
    nick: "nickname",
    fields: "sid,cid,nick,title,desc,shop_score"
}, function(err, body){
    if(err){
        return console.log(err);
    }
    console.log(body);
});

top.post("taobao.shop.get", {
    nick: "nickname",
    fields: "sid,cid,nick,title,desc,shop_score"
}, function(err, body){
    if(err){
        return console.log(err);
    }
    console.log(body);
});

API

get请求:

top.get(method, [config], args, callback)
    method:api接口名称
    config:可选,配置对象,只对当前请求有效
    args:接口参数
    callback:回调函数,包含错误参数err和响应body

post请求:

top.post(method, [config], args, callback)
    method:api接口名称
    config:可选,配置对象,只对当前请求有效
    args:接口参数
    callback:回调函数,包含错误参数err和响应body

Sugar

获取所有订单:

args = {
    start_created: 'yourStartTime',
    end_created: 'yourEndTime'
};
top.getAllTrades(args, callback)
    args:接口参数
    

具体参考 文档

Features

1、configure

配置全局参数

top.configure({
    session: "yourSession"
});

目前有效参数:

| attribute | description | default | | -------------|:-------------:| -----: | | session | session | null | | debug | 是否开启沙箱 | false | | https | https请求 | false |

目前只支持json响应格式,不支持xml格式;

目前只支持MD5加密方法;

欢迎fork!