淘宝top api搜索规则不支持cid为0参数程序如何修改

| | Comments (1)



淘宝于11月9日,更新了搜索规则,有影响到以下三个taobao.items.get,taobao.items.get,taobao.taobaoke.items.get,这三个API并且把cid=0作为入参条件的程序需要,通过查看api wiki文档,发现其实taobao.taobaoke.items.get的传入参数其实只要field和nick,那么catid的输入目的是更精确地显示商品给用户,既然需要用到在全部分类中查找 ,那就可以不必传入cid这个参数拉。


php修改方法,简单的一个判断:

if($catid != 0)
{
$Taoapi->cid = $catid;
}


意思是当传入的cid不等于0的时候,才传入cid的分类编号,否则这个参数就不需要传给api,直接用关键调用出数据就可以了。有需要的改改吧,也是今天有空把这个问题解决了。



单点日志:http://spoint.babyshoot.cn

1 Comments

谢谢,照这么改了,可以了。。。

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on November 13, 2010 4:20 PM.

富家女借种共孕骗局 was the previous entry in this blog.

Google doodle:苏格兰作家 罗伯特.路易斯.史蒂文森 诞辰160周年 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.