tmallitem

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

天猫精品库API model

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TmallBrand

type TmallBrand struct {
	// 搜索品牌id
	BrandId int64 `json:"brand_id,omitempty" xml:"brand_id,omitempty"`
	// 搜索品牌名字
	BrandName string `json:"brand_name,omitempty" xml:"brand_name,omitempty"`
}

TmallBrand

type TmallCat

type TmallCat struct {
	// 搜索前台类目id
	CatId int64 `json:"cat_id,omitempty" xml:"cat_id,omitempty"`
	// 搜索前台类目名字
	CatName string `json:"cat_name,omitempty" xml:"cat_name,omitempty"`
}

TmallCat

type TmallExtendSearchItem

type TmallExtendSearchItem struct {
	// 搜索宝贝的标题
	Title string `json:"title,omitempty" xml:"title,omitempty"`
	// 搜索宝贝的月数量
	Sold string `json:"sold,omitempty" xml:"sold,omitempty"`
	// 搜索宝贝url
	Url string `json:"url,omitempty" xml:"url,omitempty"`
	// 搜索宝贝的图片url
	PicPath string `json:"pic_path,omitempty" xml:"pic_path,omitempty"`
	// 搜索宝贝的sku最低价
	Price float64 `json:"price,omitempty" xml:"price,omitempty"`
	// 搜索宝贝的数字id
	ItemId int64 `json:"item_id,omitempty" xml:"item_id,omitempty"`
	// 搜索宝贝的卖家昵称
	Nick string `json:"nick,omitempty" xml:"nick,omitempty"`
	// 搜索宝贝的宝贝所在地
	Location string `json:"location,omitempty" xml:"location,omitempty"`
	// 搜索宝贝的卖家所在地
	SellerLoc string `json:"seller_loc,omitempty" xml:"seller_loc,omitempty"`
	// 是否免邮
	Shipping int64 `json:"shipping,omitempty" xml:"shipping,omitempty"`
	// 搜索宝贝的spuid
	SpuId int64 `json:"spu_id,omitempty" xml:"spu_id,omitempty"`
	// 是否货到付款
	IsCod int64 `json:"is_cod,omitempty" xml:"is_cod,omitempty"`
	// 邮费
	FastPostFee float64 `json:"fast_post_fee,omitempty" xml:"fast_post_fee,omitempty"`
	// 搜索宝贝的卖家数字id
	UserId int64 `json:"user_id,omitempty" xml:"user_id,omitempty"`
	// 是否折扣
	IsPromotion bool `json:"is_promotion,omitempty" xml:"is_promotion,omitempty"`
	// 搜索宝贝的sku最低价的折扣价
	PriceWithRate float64 `json:"price_with_rate,omitempty" xml:"price_with_rate,omitempty"`
}

TmallExtendSearchItem

type TmallItemsExtendSearchAPIRequest added in v1.2.0

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

搜索天猫商品 API请求 tmall.items.extend.search

提供天猫商品搜索结果,需要调用精选商品,请改为调用:tmall.selected.items.search

func NewTmallItemsExtendSearchRequest

func NewTmallItemsExtendSearchRequest() *TmallItemsExtendSearchAPIRequest

初始化TmallItemsExtendSearchAPIRequest对象

func (TmallItemsExtendSearchAPIRequest) GetApiMethodName added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetApiMethodName() string

IRequest interface 方法, 获取Api method

func (TmallItemsExtendSearchAPIRequest) GetApiParams added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetApiParams() url.Values

IRequest interface 方法, 获取API参数

func (TmallItemsExtendSearchAPIRequest) GetAuctionTag added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetAuctionTag() string

AuctionTag Getter

func (TmallItemsExtendSearchAPIRequest) GetBrand added in v1.2.0

Brand Getter

func (TmallItemsExtendSearchAPIRequest) GetCat added in v1.2.0

Cat Getter

func (TmallItemsExtendSearchAPIRequest) GetCategory added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetCategory() string

Category Getter

func (TmallItemsExtendSearchAPIRequest) GetCombo added in v1.2.0

Combo Getter

func (TmallItemsExtendSearchAPIRequest) GetEndPrice added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetEndPrice() float64

EndPrice Getter

func (TmallItemsExtendSearchAPIRequest) GetLoc added in v1.2.0

Loc Getter

func (TmallItemsExtendSearchAPIRequest) GetManyPoints added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetManyPoints() int64

ManyPoints Getter

func (TmallItemsExtendSearchAPIRequest) GetMiaosha added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetMiaosha() int64

Miaosha Getter

func (TmallItemsExtendSearchAPIRequest) GetNspu added in v1.2.0

Nspu Getter

func (TmallItemsExtendSearchAPIRequest) GetPageNo added in v1.2.0

PageNo Getter

func (TmallItemsExtendSearchAPIRequest) GetPageSize added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetPageSize() int64

PageSize Getter

func (TmallItemsExtendSearchAPIRequest) GetPostFee added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetPostFee() int64

PostFee Getter

func (TmallItemsExtendSearchAPIRequest) GetProp added in v1.2.0

Prop Getter

func (TmallItemsExtendSearchAPIRequest) GetQ added in v1.2.0

Q Getter

func (TmallItemsExtendSearchAPIRequest) GetSort added in v1.2.0

Sort Getter

func (TmallItemsExtendSearchAPIRequest) GetSpuid added in v1.2.0

Spuid Getter

func (TmallItemsExtendSearchAPIRequest) GetStartPrice added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetStartPrice() float64

StartPrice Getter

func (TmallItemsExtendSearchAPIRequest) GetSupportCod added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetSupportCod() int64

SupportCod Getter

func (TmallItemsExtendSearchAPIRequest) GetUserId added in v1.2.0

UserId Getter

func (TmallItemsExtendSearchAPIRequest) GetVip added in v1.2.0

Vip Getter

func (TmallItemsExtendSearchAPIRequest) GetWwonline added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetWwonline() int64

Wwonline Getter

func (*TmallItemsExtendSearchAPIRequest) SetAuctionTag added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetAuctionTag(_auctionTag string) error

AuctionTag Setter 商品标签。支持多选过滤,auction_tag=auction_tag1,auction_tag2,不支持天猫精品库8578

func (*TmallItemsExtendSearchAPIRequest) SetBrand added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetBrand(_brand string) error

Brand Setter 品牌的id。支持多选过滤,brand=brand1,brand2

func (*TmallItemsExtendSearchAPIRequest) SetCat added in v1.2.0

Cat Setter 前台类目id,支持多选过滤,cat=catid1,catid2

func (*TmallItemsExtendSearchAPIRequest) SetCategory added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetCategory(_category string) error

Category Setter 后台类目id,category=categoryId

func (*TmallItemsExtendSearchAPIRequest) SetCombo added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetCombo(_combo int64) error

Combo Setter 过滤搭配减价宝贝时,combo=1

func (*TmallItemsExtendSearchAPIRequest) SetEndPrice added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetEndPrice(_endPrice float64) error

EndPrice Setter 在宝贝页面中进行价格筛选的时候,如果填写了最高价格,就会显示该字段。

func (*TmallItemsExtendSearchAPIRequest) SetLoc added in v1.2.0

Loc Setter 宝贝卖家所在地,中文gbk编码

func (*TmallItemsExtendSearchAPIRequest) SetManyPoints added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetManyPoints(_manyPoints int64) error

ManyPoints Setter 是否多倍积分,1为多倍积分

func (*TmallItemsExtendSearchAPIRequest) SetMiaosha added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetMiaosha(_miaosha int64) error

Miaosha Setter 过滤折扣宝贝时,miaosha=1

func (*TmallItemsExtendSearchAPIRequest) SetNspu added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetNspu(_nspu int64) error

Nspu Setter 是否需要spu聚合的开关:1为关闭,不传表示遵循后端聚合逻辑。默认不作spu聚合。

func (*TmallItemsExtendSearchAPIRequest) SetPageNo added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetPageNo(_pageNo int64) error

PageNo Setter 页码。取值范围:大于零的整数;最大值:100;默认值:1,即默认返回第一页数据。

func (*TmallItemsExtendSearchAPIRequest) SetPageSize added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetPageSize(_pageSize int64) error

PageSize Setter 每页条数。取值范围:大于零的整数;最大值:100;默认值:40

func (*TmallItemsExtendSearchAPIRequest) SetPostFee added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetPostFee(_postFee int64) error

PostFee Setter 是否包邮,-1为包邮

func (*TmallItemsExtendSearchAPIRequest) SetProp added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetProp(_prop string) error

Prop Setter 以“属性id:属性值”的形式传入;

func (*TmallItemsExtendSearchAPIRequest) SetQ added in v1.2.0

Q Setter 表示搜索的关键字,例如搜索query=nike。当输入关键字为中文时,将对他进行URLEncode的UTF-8格式编码,如 耐克,那么q=%E8%80%90%E5%85%8B。

func (*TmallItemsExtendSearchAPIRequest) SetSort added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetSort(_sort string) error

Sort Setter 排序类型。类型包括:s: 人气排序p: 价格从低到高;pd: 价格从高到低;d: 月销量从高到低;td: 总销量从高到低;pt: 按发布时间排序.

func (*TmallItemsExtendSearchAPIRequest) SetSpuid added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetSpuid(_spuid int64) error

Spuid Setter 可以根据产品Id搜索属于这个spu的商品。

func (*TmallItemsExtendSearchAPIRequest) SetStartPrice added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetStartPrice(_startPrice float64) error

StartPrice Setter 在宝贝页面中进行价格筛选的时候,如果填写了最低价格,就会显示该字段。

func (*TmallItemsExtendSearchAPIRequest) SetSupportCod added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetSupportCod(_supportCod int64) error

SupportCod Setter 是否货到付款,1为货到付款

func (*TmallItemsExtendSearchAPIRequest) SetUserId added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetUserId(_userId int64) error

UserId Setter 可以根据卖家id搜索属于该卖家的商品

func (*TmallItemsExtendSearchAPIRequest) SetVip added in v1.2.0

Vip Setter 过滤vip宝贝时,vip=1

func (*TmallItemsExtendSearchAPIRequest) SetWwonline added in v1.2.0

func (r *TmallItemsExtendSearchAPIRequest) SetWwonline(_wwonline int64) error

Wwonline Setter 显示旺旺在线卖家的宝贝时,wwonline=1

type TmallItemsExtendSearchAPIResponse

type TmallItemsExtendSearchAPIResponse struct {
	model.CommonResponse
	TmallItemsExtendSearchAPIResponseModel
}

搜索天猫商品 API返回值 tmall.items.extend.search

提供天猫商品搜索结果,需要调用精选商品,请改为调用:tmall.selected.items.search

type TmallItemsExtendSearchAPIResponseModel added in v1.2.0

type TmallItemsExtendSearchAPIResponseModel struct {
	XMLName xml.Name `xml:"tmall_items_extend_search_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 商品列表
	ItemList []TmallExtendSearchItem `json:"item_list,omitempty" xml:"item_list>tmall_extend_search_item,omitempty"`
	// 总商品数量
	TotalResults int64 `json:"total_results,omitempty" xml:"total_results,omitempty"`
	// 查询条件
	Q string `json:"q,omitempty" xml:"q,omitempty"`
	// 类目列表
	CatList []TmallCat `json:"cat_list,omitempty" xml:"cat_list>tmall_cat,omitempty"`
	// 品牌列表
	BrandList []TmallBrand `json:"brand_list,omitempty" xml:"brand_list>tmall_brand,omitempty"`
}

搜索天猫商品 成功返回结果

Jump to

Keyboard shortcuts

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