paimai

package
v1.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package paimai 包含拍卖API相关结构体

https://open.taobao.com/API.htm?docId=38618&docType=2

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	// 属性键
	AttrKey string `json:"attr_key,omitempty" xml:"attr_key,omitempty"`
	// 属性值
	AttrValue string `json:"attr_value,omitempty" xml:"attr_value,omitempty"`
}

Feature 结构体

type ItemMateriaValueDo

type ItemMateriaValueDo struct {
	// 材质值名称
	Name string `json:"name,omitempty" xml:"name,omitempty"`
	// 当前材质值,是否需要填写含量值。比如:棉 是需要填写含量值,而牛皮 是不需要填写含量值的
	NeedContentNumber bool `json:"need_content_number,omitempty" xml:"need_content_number,omitempty"`
}

ItemMateriaValueDo 结构体

type ItemMaterialProp

type ItemMaterialProp struct {
	// 材质值列表
	Materials []ItemMateriaValueDo `json:"materials,omitempty" xml:"materials>item_materia_value_do,omitempty"`
}

ItemMaterialProp 结构体

type ItemProp

type ItemProp struct {
	//
	PropValues []PropValue `json:"prop_values,omitempty" xml:"prop_values>prop_value,omitempty"`
	// 属性的feature列表
	Features []Feature `json:"features,omitempty" xml:"features>feature,omitempty"`
	// 属性名
	Name string `json:"name,omitempty" xml:"name,omitempty"`
	// 状态。可选值:normal(正常),deleted(删除)
	Status string `json:"status,omitempty" xml:"status,omitempty"`
	// 子属性的模板(卖家自行输入属性时需要用到)
	ChildTemplate string `json:"child_template,omitempty" xml:"child_template,omitempty"`
	// 属性 ID 例:品牌的PID=20000
	Pid int64 `json:"pid,omitempty" xml:"pid,omitempty"`
	// 上级属性ID
	ParentPid int64 `json:"parent_pid,omitempty" xml:"parent_pid,omitempty"`
	// 上级属性值ID
	ParentVid int64 `json:"parent_vid,omitempty" xml:"parent_vid,omitempty"`
	// 排列序号。取值范围:大于零的整排列序号。取值范围:大于零的整数
	SortOrder int64 `json:"sort_order,omitempty" xml:"sort_order,omitempty"`
	// 度量衡相关信息
	TaosirDo *ItemTaosirDo `json:"taosir_do,omitempty" xml:"taosir_do,omitempty"`
	// 材质属性信息
	MaterialDo *ItemMaterialProp `json:"material_do,omitempty" xml:"material_do,omitempty"`
	// 是否关键属性。可选值:true(是),false(否)
	IsKeyProp bool `json:"is_key_prop,omitempty" xml:"is_key_prop,omitempty"`
	// 是否销售属性。可选值:true(是),false(否)
	IsSaleProp bool `json:"is_sale_prop,omitempty" xml:"is_sale_prop,omitempty"`
	// 是否颜色属性。可选值:true(是),false(否)
	IsColorProp bool `json:"is_color_prop,omitempty" xml:"is_color_prop,omitempty"`
	// 是否是可枚举属性。可选值:true(是),false(否)
	IsEnumProp bool `json:"is_enum_prop,omitempty" xml:"is_enum_prop,omitempty"`
	// 是否商品属性。可选值:true(是),false(否)
	IsItemProp bool `json:"is_item_prop,omitempty" xml:"is_item_prop,omitempty"`
	// 发布产品或商品时是否为必选属性。可选值:true(是),false(否)
	Must bool `json:"must,omitempty" xml:"must,omitempty"`
	// 发布产品或商品时是否可以多选。可选值:true(是),false(否)
	Multi bool `json:"multi,omitempty" xml:"multi,omitempty"`
	// 是否允许别名。可选值:true(是),false(否)
	IsAllowAlias bool `json:"is_allow_alias,omitempty" xml:"is_allow_alias,omitempty"`
	// 在is_enum_prop是true的前提下,是否是卖家可以自行输入的属性(注:如果is_enum_prop返回false,该参数统一返回false)。可选值:true(是),false(否)。<b>对于品牌和型号属性(包括子属性):如果用户是C卖家,则可自定义属性;如果是B卖家,则不可自定义属性,而必须要授权的属性。</b>
	IsInputProp bool `json:"is_input_prop,omitempty" xml:"is_input_prop,omitempty"`
	// 是否度量衡属性项
	IsTaosir bool `json:"is_taosir,omitempty" xml:"is_taosir,omitempty"`
	// 是否是材质 属性项
	IsMaterial bool `json:"is_material,omitempty" xml:"is_material,omitempty"`
}

ItemProp 结构体

type ItemTaoSirElDo

type ItemTaoSirElDo struct {
	// 显示文本
	Text string `json:"text,omitempty" xml:"text,omitempty"`
	// 0 - 类型为label元素,只用于展示,不用于组装value_name;<br/>1 - 类型为label元素,用于展示,用于组装value_name;<br/>2 - 类型为输入狂元素,主要用于卖家输入数据. 卖家填写完后需要重新设置该元素的文本数据;
	Type int64 `json:"type,omitempty" xml:"type,omitempty"`
	// 是否只用于显示的文本元素
	IsShowLabel bool `json:"is_show_label,omitempty" xml:"is_show_label,omitempty"`
	// 是否文本元素,用于显示也用于组装value_name,比如:操作符
	IsLabel bool `json:"is_label,omitempty" xml:"is_label,omitempty"`
	// 是否输入框
	IsInput bool `json:"is_input,omitempty" xml:"is_input,omitempty"`
}

ItemTaoSirElDo 结构体

type ItemTaosirDo

type ItemTaosirDo struct {
	// 卖家可选单位List<单位id,单位名>
	StdUnitList []Feature `json:"std_unit_list,omitempty" xml:"std_unit_list>feature,omitempty"`
	// 表达式元素list
	ExprElList []ItemTaoSirElDo `json:"expr_el_list,omitempty" xml:"expr_el_list>item_tao_sir_el_do,omitempty"`
	// 时间类型:0表示非时间,1表示时间点,2表示时间范围
	Type int64 `json:"type,omitempty" xml:"type,omitempty"`
	// 数值小数点精度
	Precision int64 `json:"precision,omitempty" xml:"precision,omitempty"`
}

ItemTaosirDo 结构体

type PropValue

type PropValue struct {
	// 属性值feature
	Features []Feature `json:"features,omitempty" xml:"features>feature,omitempty"`
	// 属性名
	PropName string `json:"prop_name,omitempty" xml:"prop_name,omitempty"`
	// 属性值
	Name string `json:"name,omitempty" xml:"name,omitempty"`
	// 属性值别名
	NameAlias string `json:"name_alias,omitempty" xml:"name_alias,omitempty"`
	// 状态。可选值:normal(正常),deleted(删除)
	Status string `json:"status,omitempty" xml:"status,omitempty"`
	// 修改时间(类目增量专用)
	ModifiedTime string `json:"modified_time,omitempty" xml:"modified_time,omitempty"`
	// 三种枚举类型:modify,add,delete (增量类目专用)
	ModifiedType string `json:"modified_type,omitempty" xml:"modified_type,omitempty"`
	// 类目ID
	Cid int64 `json:"cid,omitempty" xml:"cid,omitempty"`
	// 属性 ID
	Pid int64 `json:"pid,omitempty" xml:"pid,omitempty"`
	// 属性值ID
	Vid int64 `json:"vid,omitempty" xml:"vid,omitempty"`
	// 排列序号。取值范围:大于零的整数
	SortOrder int64 `json:"sort_order,omitempty" xml:"sort_order,omitempty"`
	// 是否为父类目属性
	IsParent bool `json:"is_parent,omitempty" xml:"is_parent,omitempty"`
}

PropValue 结构体

type TaobaoPaimaiItempropsGetAPIRequest

type TaobaoPaimaiItempropsGetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaoPaimaiItempropsGetAPIRequest 拍卖相关类目属性 API请求 taobao.paimai.itemprops.get

读取拍卖相关类目属性

func NewTaobaoPaimaiItempropsGetRequest

func NewTaobaoPaimaiItempropsGetRequest() *TaobaoPaimaiItempropsGetAPIRequest

NewTaobaoPaimaiItempropsGetRequest 初始化TaobaoPaimaiItempropsGetAPIRequest对象

func (TaobaoPaimaiItempropsGetAPIRequest) GetApiMethodName

func (r TaobaoPaimaiItempropsGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoPaimaiItempropsGetAPIRequest) GetApiParams

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoPaimaiItempropsGetAPIRequest) GetAttrKeys

func (r TaobaoPaimaiItempropsGetAPIRequest) GetAttrKeys() []string

GetAttrKeys AttrKeys Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetChildPath

func (r TaobaoPaimaiItempropsGetAPIRequest) GetChildPath() string

GetChildPath ChildPath Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetCid

GetCid Cid Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetDatetime

GetDatetime Datetime Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetFields

GetFields Fields Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsColorProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsColorProp() bool

GetIsColorProp IsColorProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsEnumProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsEnumProp() bool

GetIsEnumProp IsEnumProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsInputProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsInputProp() bool

GetIsInputProp IsInputProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsItemProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsItemProp() bool

GetIsItemProp IsItemProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsKeyProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsKeyProp() bool

GetIsKeyProp IsKeyProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetIsSaleProp

func (r TaobaoPaimaiItempropsGetAPIRequest) GetIsSaleProp() bool

GetIsSaleProp IsSaleProp Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetParentPid

func (r TaobaoPaimaiItempropsGetAPIRequest) GetParentPid() int64

GetParentPid ParentPid Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetPid

GetPid Pid Getter

func (TaobaoPaimaiItempropsGetAPIRequest) GetType

GetType Type Getter

func (*TaobaoPaimaiItempropsGetAPIRequest) SetAttrKeys

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetAttrKeys(_attrKeys []string) error

SetAttrKeys is AttrKeys Setter 属性的Key,支持多条,以“,”分隔

func (*TaobaoPaimaiItempropsGetAPIRequest) SetChildPath

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetChildPath(_childPath string) error

SetChildPath is ChildPath Setter 类目子属性路径,由该子属性上层的类目属性和类目属性值组成,格式pid:vid;pid:vid.取类目子属性需要传child_path,cid

func (*TaobaoPaimaiItempropsGetAPIRequest) SetCid

SetCid is Cid Setter 叶子类目ID,如果只传cid,则只返回一级属性,通过taobao.itemcats.get获得叶子类目ID

func (*TaobaoPaimaiItempropsGetAPIRequest) SetDatetime

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetDatetime(_datetime string) error

SetDatetime is Datetime Setter 增量时间戳。格式:yyyy-MM-dd HH:mm:ss假如传2005-01-01 00:00:00,则取所有的属性和子属性ID(如果传了pid会忽略datetime)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetFields

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetFields(_fields []string) error

SetFields is Fields Setter 需要返回的字段列表,见:ItemProp,默认返回:pid, name, must, multi, prop_values

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsColorProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsColorProp(_isColorProp bool) error

SetIsColorProp is IsColorProp Setter 是否颜色属性。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsEnumProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsEnumProp(_isEnumProp bool) error

SetIsEnumProp is IsEnumProp Setter 是否枚举属性。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)。如果返回true,属性值是下拉框选择输入,如果返回false,属性值是用户自行手工输入。

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsInputProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsInputProp(_isInputProp bool) error

SetIsInputProp is IsInputProp Setter 在is_enum_prop是true的前提下,是否是卖家可以自行输入的属性(注:如果is_enum_prop返回false,该参数统一返回false)。可选值:true(是),false(否) (删除的属性不会匹配和返回这个条件)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsItemProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsItemProp(_isItemProp bool) error

SetIsItemProp is IsItemProp Setter 是否商品属性,这个属性只能放于发布商品时使用。可选值:true(是),false(否)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsKeyProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsKeyProp(_isKeyProp bool) error

SetIsKeyProp is IsKeyProp Setter 是否关键属性。可选值:true(是),false(否)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetIsSaleProp

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetIsSaleProp(_isSaleProp bool) error

SetIsSaleProp is IsSaleProp Setter 是否销售属性。可选值:true(是),false(否)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetParentPid

func (r *TaobaoPaimaiItempropsGetAPIRequest) SetParentPid(_parentPid int64) error

SetParentPid is ParentPid Setter 父属性ID

func (*TaobaoPaimaiItempropsGetAPIRequest) SetPid

SetPid is Pid Setter 属性id (取类目属性时,传pid,不用同时传PID和parent_pid)

func (*TaobaoPaimaiItempropsGetAPIRequest) SetType

SetType is Type Setter 获取类目的类型:1代表集市、2代表天猫

type TaobaoPaimaiItempropsGetAPIResponse

type TaobaoPaimaiItempropsGetAPIResponse struct {
	model.CommonResponse
	TaobaoPaimaiItempropsGetAPIResponseModel
}

TaobaoPaimaiItempropsGetAPIResponse 拍卖相关类目属性 API返回值 taobao.paimai.itemprops.get

读取拍卖相关类目属性

type TaobaoPaimaiItempropsGetAPIResponseModel

type TaobaoPaimaiItempropsGetAPIResponseModel struct {
	XMLName xml.Name `xml:"paimai_itemprops_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 类目属性信息(如果是取全量或者增量,不包括属性值),根据fields传入的参数返回相应的结果
	ItemProps []ItemProp `json:"item_props,omitempty" xml:"item_props>item_prop,omitempty"`
	// lastModified
	LastModified string `json:"last_modified,omitempty" xml:"last_modified,omitempty"`
}

TaobaoPaimaiItempropsGetAPIResponseModel is 拍卖相关类目属性 成功返回结果

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL