KfcKeywordSearchRequest.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * TOP API: taobao.kfc.keyword.search request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2015.11.25
  7. */
  8. class KfcKeywordSearchRequest {
  9. /**
  10. * 应用点,分为一级应用点、二级应用点。其中一级应用点通常是指某一个系统或产品,比如淘宝的商品应用(taobao_auction);二级应用点,是指一级应用点下的具体的分类,比如商品标题(title)、商品描述(content)。不同的二级应用可以设置不同关键词。
  11. *
  12. * 这里的apply参数是由一级应用点与二级应用点合起来的字符(一级应用点+"."+二级应用点),如taobao_auction.title。
  13. *
  14. *
  15. * 通常apply参数是不需要传递的。如有特殊需求(比如特殊的过滤需求,需要自己维护一套自己词库),需传递此参数。
  16. **/
  17. private $apply;
  18. /**
  19. * 需要过滤的文本信息
  20. **/
  21. private $content;
  22. /**
  23. * 发布信息的淘宝会员名,可以不传
  24. **/
  25. private $nick;
  26. private $apiParas = array();
  27. public function setApply($apply) {
  28. $this->apply = $apply;
  29. $this->apiParas["apply"] = $apply;
  30. }
  31. public function getApply() {
  32. return $this->apply;
  33. }
  34. public function setContent($content) {
  35. $this->content = $content;
  36. $this->apiParas["content"] = $content;
  37. }
  38. public function getContent() {
  39. return $this->content;
  40. }
  41. public function setNick($nick) {
  42. $this->nick = $nick;
  43. $this->apiParas["nick"] = $nick;
  44. }
  45. public function getNick() {
  46. return $this->nick;
  47. }
  48. public function getApiMethodName() {
  49. return "taobao.kfc.keyword.search";
  50. }
  51. public function getApiParas() {
  52. return $this->apiParas;
  53. }
  54. public function check() {
  55. RequestCheckUtil::checkNotNull($this->content, "content");
  56. }
  57. public function putOtherTextParam($key, $value) {
  58. $this->apiParas[$key] = $value;
  59. $this->$key = $value;
  60. }
  61. }