Download the PHP package asundust/tmall-sdk without Composer

On this page you can find all versions of the php package asundust/tmall-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tmall-sdk

介绍

天猫商家相关的sdk

安装

composer require asundust/tmall-sdk

接口查找

查询当前sdk里是否含有需要的api搜索接口名字请全局搜索去掉开头的taobao.

如查询taobao.items.onsale.get,全局搜关键字items.onsale.get即可。

Api方法上的类注释上都放了接口文档地址。

PS:部分接口可能实际使用中涉及不到,暂时没删除接口。也别问我为什么接口不列出来。

使用

一般必传app_keysecret,像customerId属于特殊接口选传。

接口命名规则:如taobao.qimen.storeinventory.itemupdate,调用方式为单词名的驼峰式, 即Tmall::qimen($config)->storeInventory->itemUpdate(['xxx' => 'xxx']);

只有三段式的接口会多一个index方法,如taobao.refund.get的请求方式为Tmall::refund($config)->get->index(['xxx' => 'xxx']);

超过标准四段式的接口会使用驼峰的方法,如taobao.rdc.aligenius.sendgoods.cancel的请求方式为Tmall::rdc($config)->aliGenius->sendGoodsCancel(['xxx' => 'xxx']);

传参

奇门接口用的是xml格式入参的,如果入参需要入重复参数,由于PHP不支持同键数组,目前妥协办法为:键值拼上数字,在转成xml的时候自动去掉。 关于这个,如有更好建议请提出。 如:入参规则为

入参数组

上述的store0store1在转成xml后会自动变回store

Auth用户授权

执行(new \TmallSdk\Auth($config))->auth($redirectUri);

传入回调地址,拿到code去执行(new \TmallSdk\Auth($config))->getAccessToken($code);

相关文档 https://open.taobao.com/doc.htm?docId=102635&docType=1

其他

如果遇到错误之处还请各位指出

需要增加接口请告知

License

MIT license


All versions of tmall-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
ext-curl Version *
ext-libxml Version *
ext-simplexml Version *
doctrine/cache Version ^1.8
jenssegers/agent Version ^2.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asundust/tmall-sdk contains the following files

Loading the files please wait ....