jp

package
v0.0.0-...-32237eb Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

提供天猫精选的商品、店铺、活动等,方便合作伙伴做天猫导购 auto sdk from taobao ApiMetadata.xml version 20130808 auther: dz7changkong@qq.com

Index

Constants

View Source
const VersionNo = "20130808"

Variables

This section is empty.

Functions

This section is empty.

Types

type SelectedItem

type SelectedItem struct {
	Cid       int    `json:"cid"`
	ItemScore string `json:"item_score"`
	ShopId    int    `json:"shop_id"`
	TrackIid  string `json:"track_iid"`
}

天猫精选商品列表

type SpmResult

type SpmResult struct {
	AppKey     string    `json:"app_key"`
	Date       string    `json:"date"`
	SpmModules []*TopSpm `json:"spm_modules"`
	SpmPages   []*TopSpm `json:"spm_pages"`
	SpmSite    *TopSpm   `json:"spm_site"`
}

Appkey的站点导购数据

type SpmeffectGetRequest

type SpmeffectGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
导购效果SPM报表查询,可查询某天某站点某频道某页面为淘宝带来的流量及成交情况(对于page和module最多返回10000条数据,请正确使用spm数据)

只能查询距离今天3个月内的数据

func (*SpmeffectGetRequest) GetResponse

func (r *SpmeffectGetRequest) GetResponse(accessToken string) (*SpmeffectGetResponse, []byte, error)

func (*SpmeffectGetRequest) SetDate

func (r *SpmeffectGetRequest) SetDate(value string)

日期

func (*SpmeffectGetRequest) SetModuleDetail

func (r *SpmeffectGetRequest) SetModuleDetail(value string)

查询指定的SPM第四位的效果报表。默认值为false,不传视为不需要

func (*SpmeffectGetRequest) SetPageDetail

func (r *SpmeffectGetRequest) SetPageDetail(value string)

查询指定的SPM第三位的效果报表。默认值为false,不传视为不需要

type SpmeffectGetResponse

type SpmeffectGetResponse struct {
	SpmResult *SpmResult `json:"spm_result"`
}

type SpmeffectGetResponseResult

type SpmeffectGetResponseResult struct {
	Response *SpmeffectGetResponse `json:"spmeffect_get_response"`
}

type TmallBrand

type TmallBrand struct {
	BrandId   int    `json:"brand_id"`
	BrandName string `json:"brand_name"`
}

天猫搜索品牌信息

type TmallCat

type TmallCat struct {
	CatId   int    `json:"cat_id"`
	CatName string `json:"cat_name"`
}

天猫搜索类目信息

type TmallItemsDiscountSearchRequest

type TmallItemsDiscountSearchRequest struct {
	open_taobao.TaobaoMethodRequest
}

获取天猫折扣商品的精选结果。在得到商品ID列表后,再调用 taobao.taobaoke.widget.items.convert 获取有佣金的淘客推广链接。auction_tag不再支持天猫精品库。如有需要调用精选商品,请改为调用:tmall.selected.items.search

func (*TmallItemsDiscountSearchRequest) GetResponse

func (*TmallItemsDiscountSearchRequest) SetAuctionTag

func (r *TmallItemsDiscountSearchRequest) SetAuctionTag(value string)

商品标签。品牌特卖商品库:3458;天猫原创商品库:4801,不再支持 天猫精品库:8578;

func (*TmallItemsDiscountSearchRequest) SetBrand

func (r *TmallItemsDiscountSearchRequest) SetBrand(value string)

品牌的id。点击某品牌类目的时候会出现。

func (*TmallItemsDiscountSearchRequest) SetCat

func (r *TmallItemsDiscountSearchRequest) SetCat(value string)

前台类目id,目前其他接口无法获取,只能自己去寻找。建议使用关键字获取数据。支持多选过滤,cat=catid1,catid2。

func (*TmallItemsDiscountSearchRequest) SetEndPrice

func (r *TmallItemsDiscountSearchRequest) SetEndPrice(value string)

商品最高价格

func (*TmallItemsDiscountSearchRequest) SetPostFee

func (r *TmallItemsDiscountSearchRequest) SetPostFee(value string)

是否包邮,-1为包邮

func (*TmallItemsDiscountSearchRequest) SetQ

func (r *TmallItemsDiscountSearchRequest) SetQ(value string)

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

func (*TmallItemsDiscountSearchRequest) SetSort

func (r *TmallItemsDiscountSearchRequest) SetSort(value string)
排序类型。类型包括:

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

func (*TmallItemsDiscountSearchRequest) SetStart

func (r *TmallItemsDiscountSearchRequest) SetStart(value string)

可以用该字段来实现分页功能。表示查询起始位置,默认从第0条开始,start=10,表示从第10条数据开始查询,start不得大于1000。

func (*TmallItemsDiscountSearchRequest) SetStartPrice

func (r *TmallItemsDiscountSearchRequest) SetStartPrice(value string)

商品最低价格

type TmallItemsDiscountSearchResponse

type TmallItemsDiscountSearchResponse struct {
	BrandList    []*TmallBrand      `json:"brand_list"`
	CatList      []*TmallCat        `json:"cat_list"`
	ItemList     []*TmallSearchItem `json:"item_list"`
	MinisiteList []*TmallMinisite   `json:"minisite_list"`
	Page         int                `json:"page"`
	PageSize     int                `json:"page_size"`
	ParamValue   string             `json:"param_value"`
	SearchUrl    string             `json:"search_url"`
	TotalPage    int                `json:"total_page"`
	TotalResults string             `json:"total_results"`
}

type TmallItemsDiscountSearchResponseResult

type TmallItemsDiscountSearchResponseResult struct {
	Response *TmallItemsDiscountSearchResponse `json:"tmall_items_discount_search_response"`
}

type TmallMinisite

type TmallMinisite struct {
	Id         int    `json:"id"`
	Promotions string `json:"promotions"`
	Title      string `json:"title"`
	Type       int    `json:"type"`
}

天猫搜索Minisite信息

type TmallSearchItem

type TmallSearchItem struct {
	FastPostFee   float64 `json:"fast_post_fee"`
	IsCod         int     `json:"is_cod"`
	IsPromotion   bool    `json:"is_promotion"`
	ItemId        int     `json:"item_id"`
	Location      string  `json:"location"`
	Nick          string  `json:"nick"`
	PicPath       string  `json:"pic_path"`
	Price         float64 `json:"price"`
	PriceWithRate float64 `json:"price_with_rate"`
	SellerLoc     string  `json:"seller_loc"`
	Shipping      int     `json:"shipping"`
	Sold          string  `json:"sold"`
	SpuId         int     `json:"spu_id"`
	Title         string  `json:"title"`
	Url           string  `json:"url"`
	UserId        int     `json:"user_id"`
}

天猫搜索结果数据结构

type TmallSearchTmItem

type TmallSearchTmItem struct {
	BrandId        int     `json:"brand_id"`
	BrandName      string  `json:"brand_name"`
	CommentNum     string  `json:"comment_num"`
	CommissionRate string  `json:"commission_rate"`
	DetailUrl      string  `json:"detail_url"`
	PicUrl         string  `json:"pic_url"`
	Price          float64 `json:"price"`
	PromotionPrice float64 `json:"promotion_price"`
	TagHot         string  `json:"tag_hot"`
	TagLq          string  `json:"tag_lq"`
	TagNew         string  `json:"tag_new"`
	Title          string  `json:"title"`
	TrackIid       string  `json:"track_iid"`
	Volume         int     `json:"volume"`
}

天猫品牌特卖搜索结果数据结构

type TmallSelectedItemsSearchRequest

type TmallSelectedItemsSearchRequest struct {
	open_taobao.TaobaoMethodRequest
}

获取天猫各类目下精选商品列表。在得到商品ID列表后,再调用taobao.item.get获取商品详情,再调用taobao.taobaoke.items.convert 获取有佣金的淘客推广链接

func (*TmallSelectedItemsSearchRequest) GetResponse

func (*TmallSelectedItemsSearchRequest) SetCid

func (r *TmallSelectedItemsSearchRequest) SetCid(value string)

后台类目ID,支持父类目或叶子类目,可以通过taobao.itemcats.get 获取到后台类目ID列表

type TmallSelectedItemsSearchResponse

type TmallSelectedItemsSearchResponse struct {
	ItemList []*SelectedItem `json:"item_list"`
}

type TmallSelectedItemsSearchResponseResult

type TmallSelectedItemsSearchResponseResult struct {
	Response *TmallSelectedItemsSearchResponse `json:"tmall_selected_items_search_response"`
}

type TmallTemaiItemsSearchRequest

type TmallTemaiItemsSearchRequest struct {
	open_taobao.TaobaoMethodRequest
}

根据品牌特卖(temai.tmall.com)类目返回品牌特卖商品列表。在得到商品ID列表后,再调用taobao.item.get获取商品详情,再调用taobao.taobaoke.items.convert 获取有佣金的淘客推广链接

func (*TmallTemaiItemsSearchRequest) GetResponse

func (r *TmallTemaiItemsSearchRequest) GetResponse(accessToken string) (*TmallTemaiItemsSearchResponse, []byte, error)

func (*TmallTemaiItemsSearchRequest) SetCat

func (r *TmallTemaiItemsSearchRequest) SetCat(value string)

特卖前台类目id,传入的必须是特卖类目50100982或其下的二级类目。

func (*TmallTemaiItemsSearchRequest) SetSort

func (r *TmallTemaiItemsSearchRequest) SetSort(value string)

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

func (*TmallTemaiItemsSearchRequest) SetStart

func (r *TmallTemaiItemsSearchRequest) SetStart(value string)
表示查询起始位置:

start=0:返回第1条记录到第48条记录(即第一页); start=48:返回第48条记录到第96条记录(即第二页); start=96,start=144,start=192...... 依此类推,每次加start值加48(每页返回记录数固定为48条)

type TmallTemaiItemsSearchResponse

type TmallTemaiItemsSearchResponse struct {
	ItemList     []*TmallSearchTmItem `json:"item_list"`
	Page         int                  `json:"page"`
	PageSize     int                  `json:"page_size"`
	TotalPage    int                  `json:"total_page"`
	TotalResults int                  `json:"total_results"`
}

type TmallTemaiItemsSearchResponseResult

type TmallTemaiItemsSearchResponseResult struct {
	Response *TmallTemaiItemsSearchResponse `json:"tmall_temai_items_search_response"`
}

type TmallTemaiSubcatsSearchRequest

type TmallTemaiSubcatsSearchRequest struct {
	open_taobao.TaobaoMethodRequest
}

特卖子类目搜索

func (*TmallTemaiSubcatsSearchRequest) GetResponse

func (*TmallTemaiSubcatsSearchRequest) SetCat

func (r *TmallTemaiSubcatsSearchRequest) SetCat(value string)

父类目ID,固定是特卖前台一级类目id:50100982

type TmallTemaiSubcatsSearchResponse

type TmallTemaiSubcatsSearchResponse struct {
	CatList []*TmallTmCat `json:"cat_list"`
}

type TmallTemaiSubcatsSearchResponseResult

type TmallTemaiSubcatsSearchResponseResult struct {
	Response *TmallTemaiSubcatsSearchResponse `json:"tmall_temai_subcats_search_response"`
}

type TmallTmCat

type TmallTmCat struct {
	SubCatId   int    `json:"sub_cat_id"`
	SubCatName string `json:"sub_cat_name"`
}

天猫搜索特卖类目信息(查询二级类目用)

type TopSpm

type TopSpm struct {
	AlipayDealAmount string `json:"alipay_deal_amount"`
	AlipayDealCount  int    `json:"alipay_deal_count"`
	AlipayUv         int    `json:"alipay_uv"`
	Module           string `json:"module"`
	Page             string `json:"page"`
	Pv               int    `json:"pv"`
	Uv               int    `json:"uv"`
}

提供查询APPKey为淘宝带来成交以及流量

Jump to

Keyboard shortcuts

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