New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

taobao-openapi

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taobao-openapi

api client for taobao open platform

  • 1.4.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

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"
});

目前有效参数:

attributedescriptiondefault
sessionsessionnull
debug是否开启沙箱false
httpshttps请求false

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

目前只支持MD5加密方法;

欢迎fork!

Keywords

FAQs

Package last updated on 31 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc