Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.73 KB

README.md

File metadata and controls

60 lines (45 loc) · 1.73 KB

pytaobao

taobao open api in python

CircleCI

Usage

Using Specific Api Client

from pytaobao.apis.trade import TradeApi

fields = 'received_payment,receiver_country,receiver_town,pay_channel,title,pay_time'
cli = TradeApi(app_key='app_key',
               app_secret='app_secret',
               session='session')
tid = 'tid'
resp = taobao_cli.get_trade_fullinfo(fields=fields, tid=tid)

Using Base Api Client

from pytaobao.apis.base import TaobaoClient

fields = 'received_payment,receiver_country,receiver_town,pay_channel,title,pay_time'
cli = TaobaoClient(app_key='app_key',
                   app_secret='app_secret',
                   session='session')
tid = 'tid'
params = {
    'fields': fields,
    'tid': tid
}
resp = taobao_cli.perform_request(api="taobao.trades.fullinfo.get",
                                  params=params)
  • Required Parameter

  • Optional Parameter

    • endpoint
      • default is http://gw.api.taobao.com/router/rest
      • for https is https://eco.taobao.com/router/rest

Support Apis