tmallitem

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tmallitem 包含天猫精品库API相关结构体

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TmallBrand

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

TmallBrand 结构体

type TmallCat

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

TmallCat 结构体

type TmallExtendSearchItem

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

TmallExtendSearchItem 结构体

type TmallItemsExtendSearchAPIRequest added in v1.2.0

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

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

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

func NewTmallItemsExtendSearchRequest

func NewTmallItemsExtendSearchRequest() *TmallItemsExtendSearchAPIRequest

NewTmallItemsExtendSearchRequest 初始化TmallItemsExtendSearchAPIRequest对象

func (TmallItemsExtendSearchAPIRequest) GetApiMethodName added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TmallItemsExtendSearchAPIRequest) GetApiParams added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TmallItemsExtendSearchAPIRequest) GetAuctionTag added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetAuctionTag() string

GetAuctionTag AuctionTag Getter

func (TmallItemsExtendSearchAPIRequest) GetBrand added in v1.2.0

GetBrand Brand Getter

func (TmallItemsExtendSearchAPIRequest) GetCat added in v1.2.0

GetCat Cat Getter

func (TmallItemsExtendSearchAPIRequest) GetCategory added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetCategory() string

GetCategory Category Getter

func (TmallItemsExtendSearchAPIRequest) GetCombo added in v1.2.0

GetCombo Combo Getter

func (TmallItemsExtendSearchAPIRequest) GetEndPrice added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetEndPrice() float64

GetEndPrice EndPrice Getter

func (TmallItemsExtendSearchAPIRequest) GetLoc added in v1.2.0

GetLoc Loc Getter

func (TmallItemsExtendSearchAPIRequest) GetManyPoints added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetManyPoints() int64

GetManyPoints ManyPoints Getter

func (TmallItemsExtendSearchAPIRequest) GetMiaosha added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetMiaosha() int64

GetMiaosha Miaosha Getter

func (TmallItemsExtendSearchAPIRequest) GetNspu added in v1.2.0

GetNspu Nspu Getter

func (TmallItemsExtendSearchAPIRequest) GetPageNo added in v1.2.0

GetPageNo PageNo Getter

func (TmallItemsExtendSearchAPIRequest) GetPageSize added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetPageSize() int64

GetPageSize PageSize Getter

func (TmallItemsExtendSearchAPIRequest) GetPostFee added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetPostFee() int64

GetPostFee PostFee Getter

func (TmallItemsExtendSearchAPIRequest) GetProp added in v1.2.0

GetProp Prop Getter

func (TmallItemsExtendSearchAPIRequest) GetQ added in v1.2.0

GetQ Q Getter

func (TmallItemsExtendSearchAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (TmallItemsExtendSearchAPIRequest) GetSort added in v1.2.0

GetSort Sort Getter

func (TmallItemsExtendSearchAPIRequest) GetSpuid added in v1.2.0

GetSpuid Spuid Getter

func (TmallItemsExtendSearchAPIRequest) GetStartPrice added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetStartPrice() float64

GetStartPrice StartPrice Getter

func (TmallItemsExtendSearchAPIRequest) GetSupportCod added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetSupportCod() int64

GetSupportCod SupportCod Getter

func (TmallItemsExtendSearchAPIRequest) GetUserId added in v1.2.0

GetUserId UserId Getter

func (TmallItemsExtendSearchAPIRequest) GetVip added in v1.2.0

GetVip Vip Getter

func (TmallItemsExtendSearchAPIRequest) GetWwonline added in v1.2.0

func (r TmallItemsExtendSearchAPIRequest) GetWwonline() int64

GetWwonline Wwonline Getter

func (*TmallItemsExtendSearchAPIRequest) SetAuctionTag added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetBrand added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetCat added in v1.2.0

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

func (*TmallItemsExtendSearchAPIRequest) SetCategory added in v1.2.0

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

SetCategory is Category Setter 后台类目id,category=categoryId

func (*TmallItemsExtendSearchAPIRequest) SetCombo added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetEndPrice added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetLoc added in v1.2.0

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

func (*TmallItemsExtendSearchAPIRequest) SetManyPoints added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetMiaosha added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetNspu added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetPageNo added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetPageSize added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetPostFee added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetProp added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetQ added in v1.2.0

SetQ is 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

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

func (*TmallItemsExtendSearchAPIRequest) SetSpuid added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetStartPrice added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetSupportCod added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetUserId added in v1.2.0

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

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

func (*TmallItemsExtendSearchAPIRequest) SetVip added in v1.2.0

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

func (*TmallItemsExtendSearchAPIRequest) SetWwonline added in v1.2.0

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

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

type TmallItemsExtendSearchAPIResponse

type TmallItemsExtendSearchAPIResponse struct {
	model.CommonResponse
	TmallItemsExtendSearchAPIResponseModel
}

TmallItemsExtendSearchAPIResponse 搜索天猫商品 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"`
	// 品牌列表
	BrandList []TmallBrand `json:"brand_list,omitempty" xml:"brand_list>tmall_brand,omitempty"`
	// 商品列表
	ItemList []TmallExtendSearchItem `json:"item_list,omitempty" xml:"item_list>tmall_extend_search_item,omitempty"`
	// 类目列表
	CatList []TmallCat `json:"cat_list,omitempty" xml:"cat_list>tmall_cat,omitempty"`
	// 查询条件
	Q string `json:"q,omitempty" xml:"q,omitempty"`
	// 总商品数量
	TotalResults int64 `json:"total_results,omitempty" xml:"total_results,omitempty"`
}

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

Jump to

Keyboard shortcuts

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