Get Parent Categories ( 取得父分類資訊 ) - ec-yahoo/ntu-hackathon GitHub Wiki

Usage

Get Parent Categories

Table Name

ecstore.category.get_parent_categories

Parameters

Keys Description Required Example
categoryId categoryId true 152983414

Sample Query

select * from ecstore.category.get_parent_categories where categoryId="152982958"

Sample Response

url : https://partner.yql.yahoo.com/v1/public/yql?q=select%20*%20from%20ecstore.category.get_parent_categories%20where%20categoryId%3D%22152982958%22&format=json

{
 "query": {
  "count": 1,
  "created": "2017-07-13T08:47:21Z",
  "lang": "en-US",
  "results": {
   "Response": {
    "Status": "ok",
    "Result": {
     "parentCategories": {
      "category": [
       {
        "categoryId": "152982920",
        "name": "電腦/週邊",
        "level": 1,
        "isLink": 0,
        "isLeaf": 0,
        "isAdult": 0,
        "displayMode": "both",
        "parentCategoryId": "0"
       },
       {
        "categoryId": "0",
        "name": "超級商城",
        "level": 0,
        "isLink": 0,
        "isLeaf": 0,
        "isAdult": 0,
        "displayMode": null,
        "parentCategoryId": "0"
       }
      ]
     }
    }
   }
  }
 }
}