Documentation ¶
Overview ¶
提供了标准类目,类目属性和类目属性值的查询功能 auto sdk from taobao ApiMetadata.xml version 20140725 auther: dz7changkong@qq.com
Index ¶
- Constants
- type Brand
- type Feature
- type ItemCat
- type ItemProp
- type ItemcatsAuthorizeGetRequest
- type ItemcatsAuthorizeGetResponse
- type ItemcatsAuthorizeGetResponseResult
- type ItemcatsGetRequest
- type ItemcatsGetResponse
- type ItemcatsGetResponseResult
- type ItempropsGetRequest
- func (r *ItempropsGetRequest) GetResponse(accessToken string) (*ItempropsGetResponse, []byte, error)
- func (r *ItempropsGetRequest) SetAttrKeys(value string)
- func (r *ItempropsGetRequest) SetChildPath(value string)
- func (r *ItempropsGetRequest) SetCid(value string)
- func (r *ItempropsGetRequest) SetFields(value string)
- func (r *ItempropsGetRequest) SetIsColorProp(value string)
- func (r *ItempropsGetRequest) SetIsEnumProp(value string)
- func (r *ItempropsGetRequest) SetIsInputProp(value string)
- func (r *ItempropsGetRequest) SetIsItemProp(value string)
- func (r *ItempropsGetRequest) SetIsKeyProp(value string)
- func (r *ItempropsGetRequest) SetIsSaleProp(value string)
- func (r *ItempropsGetRequest) SetParentPid(value string)
- func (r *ItempropsGetRequest) SetPid(value string)
- func (r *ItempropsGetRequest) SetType(value string)
- type ItempropsGetResponse
- type ItempropsGetResponseResult
- type ItempropvaluesGetRequest
- func (r *ItempropvaluesGetRequest) GetResponse(accessToken string) (*ItempropvaluesGetResponse, []byte, error)
- func (r *ItempropvaluesGetRequest) SetAttrKeys(value string)
- func (r *ItempropvaluesGetRequest) SetCid(value string)
- func (r *ItempropvaluesGetRequest) SetFields(value string)
- func (r *ItempropvaluesGetRequest) SetPvs(value string)
- func (r *ItempropvaluesGetRequest) SetType(value string)
- type ItempropvaluesGetResponse
- type ItempropvaluesGetResponseResult
- type PropValue
- type SellerAuthorize
Constants ¶
const VersionNo = "20140725"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Brand ¶
type Brand struct { Name string `json:"name"` Pid int `json:"pid"` PropName string `json:"prop_name"` Vid int `json:"vid"` }
品牌
type ItemCat ¶
type ItemCat struct { Cid int `json:"cid"` Features struct { Feature []*Feature `json:"feature"` } `json:"features"` IsParent bool `json:"is_parent"` Name string `json:"name"` ParentCid int `json:"parent_cid"` SortOrder int `json:"sort_order"` Status string `json:"status"` }
商品类目结构
type ItemProp ¶
type ItemProp struct { ChildTemplate string `json:"child_template"` Cid int `json:"cid"` Features struct { Feature []*Feature `json:"feature"` } `json:"features"` IsAllowAlias bool `json:"is_allow_alias"` IsColorProp bool `json:"is_color_prop"` IsEnumProp bool `json:"is_enum_prop"` IsInputProp bool `json:"is_input_prop"` IsItemProp bool `json:"is_item_prop"` IsKeyProp bool `json:"is_key_prop"` IsSaleProp bool `json:"is_sale_prop"` ModifiedTime string `json:"modified_time"` ModifiedType string `json:"modified_type"` Multi bool `json:"multi"` Must bool `json:"must"` Name string `json:"name"` ParentPid int `json:"parent_pid"` ParentVid int `json:"parent_vid"` Pid int `json:"pid"` PropValues struct { PropValue []*PropValue `json:"prop_value"` } `json:"prop_values"` Required bool `json:"required"` SortOrder int `json:"sort_order"` Status string `json:"status"` Type string `json:"type"` }
商品属性
type ItemcatsAuthorizeGetRequest ¶
type ItemcatsAuthorizeGetRequest struct {
open_taobao.TaobaoMethodRequest
}
查询B商家被授权品牌列表、类目列表和 c 商家新品类目列表
func (*ItemcatsAuthorizeGetRequest) GetResponse ¶
func (r *ItemcatsAuthorizeGetRequest) GetResponse(accessToken string) (*ItemcatsAuthorizeGetResponse, []byte, error)
func (*ItemcatsAuthorizeGetRequest) SetFields ¶
func (r *ItemcatsAuthorizeGetRequest) SetFields(value string)
需要返回的字段。目前支持有:
brand.vid, brand.name, item_cat.cid, item_cat.name, item_cat.status,item_cat.sort_order,item_cat.parent_cid,item_cat.is_parent, xinpin_item_cat.cid, xinpin_item_cat.name, xinpin_item_cat.status, xinpin_item_cat.sort_order, xinpin_item_cat.parent_cid, xinpin_item_cat.is_parent
type ItemcatsAuthorizeGetResponse ¶
type ItemcatsAuthorizeGetResponse struct {
SellerAuthorize *SellerAuthorize `json:"seller_authorize"`
}
type ItemcatsAuthorizeGetResponseResult ¶
type ItemcatsAuthorizeGetResponseResult struct {
Response *ItemcatsAuthorizeGetResponse `json:"itemcats_authorize_get_response"`
}
type ItemcatsGetRequest ¶
type ItemcatsGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取后台供卖家发布商品的标准商品类目。
func (*ItemcatsGetRequest) GetResponse ¶
func (r *ItemcatsGetRequest) GetResponse(accessToken string) (*ItemcatsGetResponse, []byte, error)
func (*ItemcatsGetRequest) SetCids ¶
func (r *ItemcatsGetRequest) SetCids(value string)
商品所属类目ID列表,用半角逗号(,)分隔 例如:(18957,19562,) (cids、parent_cid至少传一个)<br /> 支持最大值为:9223372036854775807<br /> 支持最小值为:0
func (*ItemcatsGetRequest) SetFields ¶
func (r *ItemcatsGetRequest) SetFields(value string)
需要返回的字段列表,见ItemCat,默认返回:cid,parent_cid,name,is_parent
func (*ItemcatsGetRequest) SetParentCid ¶
func (r *ItemcatsGetRequest) SetParentCid(value string)
父商品类目 id,0表示根节点, 传输该参数返回所有子类目。 (cids、parent_cid至少传一个)<br /> 支持最大值为:9223372036854775807<br /> 支持最小值为:0
type ItemcatsGetResponse ¶
type ItemcatsGetResponseResult ¶
type ItemcatsGetResponseResult struct {
Response *ItemcatsGetResponse `json:"itemcats_get_response"`
}
type ItempropsGetRequest ¶
type ItempropsGetRequest struct {
open_taobao.TaobaoMethodRequest
}
通过设置必要的参数,来获取商品后台标准类目属性,以及这些属性里面详细的属性值prop_values。
func (*ItempropsGetRequest) GetResponse ¶
func (r *ItempropsGetRequest) GetResponse(accessToken string) (*ItempropsGetResponse, []byte, error)
func (*ItempropsGetRequest) SetAttrKeys ¶
func (r *ItempropsGetRequest) SetAttrKeys(value string)
属性的Key,支持多条,以“,”分隔
func (*ItempropsGetRequest) SetChildPath ¶
func (r *ItempropsGetRequest) SetChildPath(value string)
类目子属性路径,由该子属性上层的类目属性和类目属性值组成,格式pid:vid;pid:vid.取类目子属性需要传child_path,cid
func (*ItempropsGetRequest) SetCid ¶
func (r *ItempropsGetRequest) SetCid(value string)
叶子类目ID,如果只传cid,则只返回一级属性,通过taobao.itemcats.get获得叶子类目ID
func (*ItempropsGetRequest) SetFields ¶
func (r *ItempropsGetRequest) SetFields(value string)
需要返回的字段列表,见:ItemProp,默认返回:pid, name, must, multi, prop_values
func (*ItempropsGetRequest) SetIsColorProp ¶
func (r *ItempropsGetRequest) SetIsColorProp(value string)
是否颜色属性。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)
func (*ItempropsGetRequest) SetIsEnumProp ¶
func (r *ItempropsGetRequest) SetIsEnumProp(value string)
是否枚举属性。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)。如果返回true,属性值是下拉框选择输入,如果返回false,属性值是用户自行手工输入。
func (*ItempropsGetRequest) SetIsInputProp ¶
func (r *ItempropsGetRequest) SetIsInputProp(value string)
在is_enum_prop是true的前提下,是否是卖家可以自行输入的属性(注:如果is_enum_prop返回false,该参数统一返回false)。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)
func (*ItempropsGetRequest) SetIsItemProp ¶
func (r *ItempropsGetRequest) SetIsItemProp(value string)
是否商品属性,这个属性只能放于发布商品时使用。可选值:true(是),false(否)
func (*ItempropsGetRequest) SetIsKeyProp ¶
func (r *ItempropsGetRequest) SetIsKeyProp(value string)
是否关键属性。可选值:true(是),false(否)
func (*ItempropsGetRequest) SetIsSaleProp ¶
func (r *ItempropsGetRequest) SetIsSaleProp(value string)
是否销售属性。可选值:true(是),false(否)
func (*ItempropsGetRequest) SetParentPid ¶
func (r *ItempropsGetRequest) SetParentPid(value string)
父属性ID
func (*ItempropsGetRequest) SetPid ¶
func (r *ItempropsGetRequest) SetPid(value string)
属性id (取类目属性时,传pid,不用同时传PID和parent_pid)
func (*ItempropsGetRequest) SetType ¶
func (r *ItempropsGetRequest) SetType(value string)
获取类目的类型:1代表集市、2代表天猫<br /> 支持最大值为:2<br /> 支持最小值为:1
type ItempropsGetResponse ¶
type ItempropsGetResponseResult ¶
type ItempropsGetResponseResult struct {
Response *ItempropsGetResponse `json:"itemprops_get_response"`
}
type ItempropvaluesGetRequest ¶
type ItempropvaluesGetRequest struct {
open_taobao.TaobaoMethodRequest
}
传入类目ID,必需是叶子类目,通过taobao.itemcats.get获取类目ID
返回字段目前支持有:cid,pid,prop_name,vid,name,name_alias,status,sort_order 作用:获取标准类目属性值
func (*ItempropvaluesGetRequest) GetResponse ¶
func (r *ItempropvaluesGetRequest) GetResponse(accessToken string) (*ItempropvaluesGetResponse, []byte, error)
func (*ItempropvaluesGetRequest) SetAttrKeys ¶
func (r *ItempropvaluesGetRequest) SetAttrKeys(value string)
属性的Key,支持多条,以“,”分隔
func (*ItempropvaluesGetRequest) SetCid ¶
func (r *ItempropvaluesGetRequest) SetCid(value string)
叶子类目ID ,通过taobao.itemcats.get获得叶子类目ID
func (*ItempropvaluesGetRequest) SetFields ¶
func (r *ItempropvaluesGetRequest) SetFields(value string)
需要返回的字段。目前支持有:cid,pid,prop_name,vid,name,name_alias,status,sort_order
func (*ItempropvaluesGetRequest) SetPvs ¶
func (r *ItempropvaluesGetRequest) SetPvs(value string)
属性和属性值 id串,格式例如(pid1;pid2)或(pid1:vid1;pid2:vid2)或(pid1;pid2:vid2)
func (*ItempropvaluesGetRequest) SetType ¶
func (r *ItempropvaluesGetRequest) SetType(value string)
获取类目的类型:1代表集市、2代表天猫<br /> 支持最大值为:2<br /> 支持最小值为:1
type ItempropvaluesGetResponseResult ¶
type ItempropvaluesGetResponseResult struct {
Response *ItempropvaluesGetResponse `json:"itempropvalues_get_response"`
}
type PropValue ¶
type PropValue struct { Cid int `json:"cid"` Features struct { Feature []*Feature `json:"feature"` } `json:"features"` IsParent bool `json:"is_parent"` ModifiedTime string `json:"modified_time"` ModifiedType string `json:"modified_type"` Name string `json:"name"` NameAlias string `json:"name_alias"` Pid int `json:"pid"` PropName string `json:"prop_name"` SortOrder int `json:"sort_order"` Status string `json:"status"` Vid int `json:"vid"` }
属性值
type SellerAuthorize ¶
type SellerAuthorize struct { Brands struct { Brand []*Brand `json:"brand"` } `json:"brands"` ItemCats struct { ItemCat []*ItemCat `json:"item_cat"` } `json:"item_cats"` XinpinItemCats struct { ItemCat []*ItemCat `json:"item_cat"` } `json:"xinpin_item_cats"` }
授权