Authored by yun

分类相关接口已有,但是没有接口文档

  1 +## 1、获得分类的接口##
  2 +
  3 + operations/api/v6/category/getCategory
  4 +#### 请求参数
  5 +| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
  6 +|:-------| -----:|-----:|-----:|-----:|----:|
  7 +|client_type|string|是|iphone|h5|客户端类型|
  8 +|parent_id|int|是|0|上级分类id|
  9 +
  10 +注意,通用的头部没有列出。
  11 +请求示例
  12 +http://service.yoho.cn/operations/api/v6/category/getCategory?app_version=4.5.0.1605190001&client_secret=dcf93b7f3bb6374a8088cd335801a480&client_type=iphone&os_version=9.3&screen_size=320x568&v=7&parent_id=0
  13 +
  14 +### 响应
  15 +code为200即为成功,否则是失败。
  16 +响应JSON格式如下所示:
  17 +```json
  18 +{
  19 + "alg": "SALT_MD5",
  20 + "code": 200,
  21 + "data": [
  22 + {
  23 + "content_code": "0",
  24 + "id": "1",
  25 + "is_hot": "N",
  26 + "is_new": "N",
  27 + "parent_id": "0",
  28 + "separative_sign": "N",
  29 + "sort_ico": "http://img12.static.yhbimg.com/yhb-img01/2015/11/27/05/0239d9aa5a77b4b3ae51da224e71596e88.png?imageView/{mode}/w/{width}/h/{height}",
  30 + "sort_ico_big": "",
  31 + "sort_name": "男生",
  32 + "sort_name_color": "",
  33 + "sort_name_en": "BOYS",
  34 + "sort_url": "http://m.yohobuy.com/boys.html?openby:yohobuy={\"action\":\"go.home\",\"params\":{\"channel\":1,\"gender\":1}}"
  35 + },
  36 + {
  37 + "content_code": "0",
  38 + "id": "3",
  39 + "is_hot": "N",
  40 + "is_new": "N",
  41 + "parent_id": "0",
  42 + "separative_sign": "N",
  43 + "sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/11/27/05/0154cc26d5ce1754e0d20f4f6f98153f6b.png?imageView/{mode}/w/{width}/h/{height}",
  44 + "sort_ico_big": "",
  45 + "sort_name": "潮童",
  46 + "sort_name_color": "",
  47 + "sort_name_en": "KIDS",
  48 + "sort_url": "http://m.yohobuy.com/kids.html?openby:yohobuy={\"action\":\"go.home\",\"params\":{\"channel\":3,\"gender\":3}}"
  49 + },
  50 + {
  51 + "content_code": "0",
  52 + "id": "4",
  53 + "is_hot": "N",
  54 + "is_new": "N",
  55 + "parent_id": "0",
  56 + "separative_sign": "N",
  57 + "sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/11/27/05/010605a7b69aff7de5560c090303f72813.png?imageView/{mode}/w/{width}/h/{height}",
  58 + "sort_ico_big": "",
  59 + "sort_name": "创意生活",
  60 + "sort_name_color": "",
  61 + "sort_name_en": "LIFE STYLE",
  62 + "sort_url": "http://m.yohobuy.com/life.html?openby:yohobuy={\"action\":\"go.home\",\"params\":{\"channel\":4,\"gender\":4}}"
  63 + },
  64 + {
  65 + "content_code": "0",
  66 + "id": "825",
  67 + "is_hot": "N",
  68 + "is_new": "N",
  69 + "parent_id": "0",
  70 + "separative_sign": "N",
  71 + "sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/11/27/05/01f6ba813833a4e8462fdeab4246f5102b.png?imageView/{mode}/w/{width}/h/{height}",
  72 + "sort_ico_big": "",
  73 + "sort_name": "折扣专区",
  74 + "sort_name_color": "",
  75 + "sort_name_en": "SALE",
  76 + "sort_url": "http://m.yohobuy.com/sale?openby:yohobuy={\"action\":\"go.sale\"}"
  77 + },
  78 + {
  79 + "content_code": "0",
  80 + "id": "829",
  81 + "is_hot": "N",
  82 + "is_new": "N",
  83 + "parent_id": "0",
  84 + "separative_sign": "Y",
  85 + "sort_ico": "http://img12.static.yhbimg.com/yhb-img01/2015/10/23/11/02373b196b49969dcd261721359977d89d.png?imageView/{mode}/w/{width}/h/{height}",
  86 + "sort_ico_big": "http://img12.static.yhbimg.com/yhb-img02/2015/10/23/11/02dec04a9a0e2078614a6b5ecbcb42fcd7.png?imageView/{mode}/w/{width}/h/{height}",
  87 + "sort_name": "潮流优选",
  88 + "sort_name_color": "",
  89 + "sort_name_en": "PLUS",
  90 + "sort_url": "http://m.yohobuy.com?openby:yohobuy={\"action\":\"go.plus\"}"
  91 + },
  92 + {
  93 + "content_code": "0",
  94 + "id": "831",
  95 + "is_hot": "N",
  96 + "is_new": "N",
  97 + "parent_id": "0",
  98 + "separative_sign": "N",
  99 + "sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/10/23/11/0143e25696ee253d30eb2fa514a15a3c77.png?imageView/{mode}/w/{width}/h/{height}",
  100 + "sort_ico_big": "http://img12.static.yhbimg.com/yhb-img02/2015/10/23/11/024306dc2eb4f5633f5f64652d49e08c51.png?imageView/{mode}/w/{width}/h/{height}",
  101 + "sort_name": "明星原创",
  102 + "sort_name_color": "",
  103 + "sort_name_en": "STAR",
  104 + "sort_url": "http://m.yohobuy.com?openby:yohobuy={\"action\":\"go.star\"}"
  105 + },
  106 + {
  107 + "content_code": "0",
  108 + "id": "1034",
  109 + "is_hot": "N",
  110 + "is_new": "N",
  111 + "parent_id": "0",
  112 + "separative_sign": "N",
  113 + "sort_ico": "http://img12.static.yhbimg.com/yhb-img01/2016/02/17/08/020ed8ca2df42c5f8e8a7ba25e1524931f.png?imageView/{mode}/w/{width}/h/{height}",
  114 + "sort_ico_big": "http://img12.static.yhbimg.com/yhb-img02/2016/02/16/07/026e0548697c824cc7972d5a885ed94ff8.png?imageView/{mode}/w/{width}/h/{height}",
  115 + "sort_name": "全球购",
  116 + "sort_name_color": "",
  117 + "sort_name_en": "global shop",
  118 + "sort_url": "m.yohobuy.com?openby:yohobuy={\"action\":\"go.globalpurchase\"}"
  119 + }
  120 + ],
  121 + "md5": "acdcf18c7cac314197ea56e99879af31",
  122 + "message": "Operation Category List"
  123 +}
  124 +```
  125 +
  126 +### 响应结果字段说明
  127 +| Param Name | type | Param Value | Desc |
  128 +| ---------- | ---- | ----------- | ----- |
  129 +| content_code | string | | 资源位code码 |
  130 +| id | string | | 分类ID |
  131 +| is_hot| string | | 是否热门 |
  132 +| is_new| string | | 是否新品 |
  133 +| parent_id| string | | 上级分类ID |
  134 +| separative_sign | string | | 分隔符 |
  135 +| sort_ico| string | | 分类图标 |
  136 +| sort_ico_big| string | | 分类大图标 |
  137 +| sort_name| string | | 分类名称 |
  138 +| sort_name_color| string | | 分类色值 |
  139 +| sort_name_en| string | | 英文名称 |
  140 +| sort_url| string | | 跳转链接 |