Documentation
¶
Index ¶
- Constants
- func NewParamsWithType(_method string, params ...gorequest.Params) gorequest.Params
- type Client
- func (c *Client) ConfigApiGormFun(apiClientFun golog.ApiGormFun)
- func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- func (c *Client) GetAdzoneId() int64
- func (c *Client) GetAppKey() string
- func (c *Client) GetAppSecret() string
- func (c *Client) Sign(p gorequest.Params)
- func (c *Client) TbkActivityInfoGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkActivityInfoGetResult, error)
- func (c *Client) TbkCouponGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkCouponGetResult, error)
- func (c *Client) TbkDgMaterialOptional(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgMaterialOptionalResult, error)
- func (c *Client) TbkDgNewuserOrderGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgNewuserOrderGetResult, error)
- func (c *Client) TbkDgOptimusMaterial(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgOptimusMaterialResult, error)
- func (c *Client) TbkItemInfoGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkItemInfoGetResult, error)
- func (c *Client) TbkOrderDetailsGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkOrderDetailsGetResult, error)
- func (c *Client) TbkShopGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkShopGetResult, error)
- func (c *Client) TbkShopRecommendGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkShopRecommendGetResult, error)
- func (c *Client) TbkSpreadGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkSpreadGetResult, error)
- func (c *Client) TbkTPwdCreate(ctx context.Context, notMustParams ...gorequest.Params) (*TbkTPwdCreateResult, error)
- type ClientConfig
- type ErrResp
- type TbkActivityInfoGetResponse
- type TbkActivityInfoGetResult
- type TbkCouponGetResponse
- type TbkCouponGetResult
- type TbkDgMaterialOptionalResponse
- type TbkDgMaterialOptionalResult
- type TbkDgNewuserOrderGetResponse
- type TbkDgNewuserOrderGetResult
- type TbkDgOptimusMaterialResponse
- type TbkDgOptimusMaterialResult
- type TbkItemInfoGetResponse
- type TbkItemInfoGetResult
- type TbkOrderDetailsGetResponse
- type TbkOrderDetailsGetResult
- type TbkShopGetResponse
- type TbkShopGetResult
- type TbkShopRecommendGetResponse
- type TbkShopRecommendGetResult
- type TbkSpreadGetResponse
- type TbkSpreadGetResult
- type TbkTPwdCreateResponse
- type TbkTPwdCreateResult
Constants ¶
const (
LogTable = "taobao"
)
const (
Version = "1.0.14"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) ConfigApiGormFun ¶ added in v1.0.14
func (c *Client) ConfigApiGormFun(apiClientFun golog.ApiGormFun)
ConfigApiGormFun 接口日志配置
func (*Client) GetAdzoneId ¶
func (*Client) GetAppSecret ¶
func (*Client) TbkActivityInfoGet ¶
func (c *Client) TbkActivityInfoGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkActivityInfoGetResult, error)
TbkActivityInfoGet 淘宝客-推广者-官方活动转链 https://open.taobao.com/api.htm?spm=a219a.7386797.0.0.5a83669a7rURsF&source=search&docId=48340&docType=2
func (*Client) TbkCouponGet ¶
func (c *Client) TbkCouponGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkCouponGetResult, error)
TbkCouponGet 淘宝客-公用-阿里妈妈推广券详情查询 https://open.taobao.com/api.htm?docId=31106&docType=2
func (*Client) TbkDgMaterialOptional ¶
func (c *Client) TbkDgMaterialOptional(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgMaterialOptionalResult, error)
TbkDgMaterialOptional 淘宝客-推广者-物料搜索 https://open.taobao.com/api.htm?docId=35896&docType=2&source=search
func (*Client) TbkDgNewuserOrderGet ¶
func (c *Client) TbkDgNewuserOrderGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgNewuserOrderGetResult, error)
TbkDgNewuserOrderGet 淘宝客-推广者-新用户订单明细查询 https://open.taobao.com/api.htm?docId=33892&docType=2
func (*Client) TbkDgOptimusMaterial ¶
func (c *Client) TbkDgOptimusMaterial(ctx context.Context, notMustParams ...gorequest.Params) (*TbkDgOptimusMaterialResult, error)
TbkDgOptimusMaterial 淘宝客-推广者-物料精选 https://open.taobao.com/api.htm?docId=33947&docType=2&source=search
func (*Client) TbkItemInfoGet ¶
func (c *Client) TbkItemInfoGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkItemInfoGetResult, error)
TbkItemInfoGet 淘宝客-公用-淘宝客商品详情查询(简版) https://open.taobao.com/api.htm?docId=24518&docType=2&source=search
func (*Client) TbkOrderDetailsGet ¶
func (c *Client) TbkOrderDetailsGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkOrderDetailsGetResult, error)
TbkOrderDetailsGet 淘宝客-推广者-所有订单查询 https://open.taobao.com/api.htm?docId=43328&docType=2&scopeId=16175
func (*Client) TbkShopGet ¶
func (c *Client) TbkShopGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkShopGetResult, error)
TbkShopGet 淘宝客-推广者-店铺搜索 https://open.taobao.com/api.htm?docId=24521&docType=2
func (*Client) TbkShopRecommendGet ¶
func (c *Client) TbkShopRecommendGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkShopRecommendGetResult, error)
TbkShopRecommendGet 淘宝客-公用-店铺关联推荐 https://open.taobao.com/api.htm?docId=24522&docType=2
func (*Client) TbkSpreadGet ¶
func (c *Client) TbkSpreadGet(ctx context.Context, notMustParams ...gorequest.Params) (*TbkSpreadGetResult, error)
TbkSpreadGet 淘宝客-公用-长链转短链 https://open.taobao.com/api.htm?docId=27832&docType=2&source=search
func (*Client) TbkTPwdCreate ¶
func (c *Client) TbkTPwdCreate(ctx context.Context, notMustParams ...gorequest.Params) (*TbkTPwdCreateResult, error)
TbkTPwdCreate 淘宝客-公用-淘口令生成 https://open.taobao.com/api.htm?docId=31127&docType=2&source=search
type ClientConfig ¶ added in v1.0.6
type ClientConfig struct {
AppKey string // 应用Key
AppSecret string // 密钥
AdzoneId int64 // mm_xxx_xxx_xxx的第三位
}
ClientConfig 实例配置
type TbkActivityInfoGetResponse ¶
type TbkActivityInfoGetResponse struct {
TbkActivityInfoGetResponse struct {
Data struct {
WxQrcodeUrl string `json:"wx_qrcode_url"`
ClickUrl string `json:"click_url"`
ShortClickUrl string `json:"short_click_url"`
TerminalType string `json:"terminal_type"`
MaterialOssUrl string `json:"material_oss_url"`
PageName string `json:"page_name"`
PageStartTime string `json:"page_start_time"`
PageEndTime string `json:"page_end_time"`
WxMiniprogramPath string `json:"wx_miniprogram_path"`
} `json:"data"`
} `json:"tbk_activity_info_get_response"`
}
type TbkActivityInfoGetResult ¶
type TbkActivityInfoGetResult struct {
Result TbkActivityInfoGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkCouponGetResponse ¶
type TbkCouponGetResponse struct {
TbkCouponGetResponse struct {
Results struct {
NTbkItem []struct {
CatLeafName string `json:"cat_leaf_name"`
CatName string `json:"cat_name"`
FreeShipment bool `json:"free_shipment"`
HotFlag string `json:"hot_flag"`
ItemUrl string `json:"item_url"`
JuOnlineEnd string `json:"ju_online_end"`
JuOnlineStartTime string `json:"ju_online_start_time"`
JuPreShowEndTime string `json:"ju_pre_show_end_time"`
JuPreShowStartTime string `json:"ju_pre_show_start_time"`
MaterialLibType string `json:"material_lib_type"`
Nick string `json:"nick"`
NumIid int64 `json:"num_iid"`
PictUrl string `json:"pict_url"`
PresaleDeposit string `json:"presale_deposit"`
PresaleEndTime int `json:"presale_end_time"`
PresaleStartTime int `json:"presale_start_time"`
PresaleTailEndTime int `json:"presale_tail_end_time"`
PresaleTailStartTime int `json:"presale_tail_start_time"`
Provcity string `json:"provcity"`
ReservePrice string `json:"reserve_price"`
SellerId int64 `json:"seller_id"`
SmallImages struct {
String []string `json:"string"`
} `json:"small_images"`
SuperiorBrand string `json:"superior_brand"`
Title string `json:"title"`
TmallPllPlayActivityStartTime int `json:"tmall_pll_play_activity_start_time"`
UserType int `json:"user_type"`
Volume int64 `json:"volume"`
ZkFinalPrice string `json:"zk_final_price"`
} `json:"n_tbk_item"`
} `json:"results"`
RequestId string `json:"request_id"`
} `json:"tbk_item_info_get_response"`
}
type TbkCouponGetResult ¶
type TbkCouponGetResult struct {
Result TbkCouponGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkDgMaterialOptionalResponse ¶
type TbkDgMaterialOptionalResponse struct {
TbkDgMaterialOptionalResponse struct {
ResultList struct {
MapData []struct {
CategoryId int `json:"category_id"`
CategoryName string `json:"category_name"`
CommissionRate string `json:"commission_rate"`
CommissionType string `json:"commission_type"`
CouponId string `json:"coupon_id"`
CouponInfo string `json:"coupon_info"`
CouponRemainCount int `json:"coupon_remain_count"`
CouponCount int `json:"coupon__count"`
CpaRewardType string `json:"cpa_reward_type"`
IncludeDxjh string `json:"include_dxjh"`
IncludeMkt string `json:"include_mkt"`
InfoDxjh string `json:"info_dxjh"`
ItemDescription string `json:"item_description"`
ItemId string `json:"item_id"`
ItemUrl string `json:"item_url"`
LevelOneCategoryId int64 `json:"level_one_category_id"`
LevelOneCategoryName string `json:"level_one_category_name"`
Nick string `json:"nick"`
NumIid int64 `json:"num_iid"`
PictUrl string `json:"pict_url"`
Presale int `json:"presale"`
PresaleDiscountFeeText string `json:"presale_discount_fee_text"`
PresaleEndTime int64 `json:"presale_end_time"`
PresaleStartTime int64 `json:"presale_start_time"`
PresaleTailEndTime int64 `json:"presale_tail_end_time"`
PresaleTailStartTime int64 `json:"presale_tail_start_time"`
Provcity string `json:"provcity"`
RealPostFe int `json:"real_post_fe"`
ReservePrice string `json:"reserve_price"`
SellerId int64 `json:"seller_id"`
ShopDsr int `json:"shop_dsr"`
ShopTitle string `json:"shop_title"`
ShortTitle string `json:"short_title"`
SmallImages struct {
String []string `json:"string"`
} `json:"small_images"`
SuperiorBrand string `json:"superior_brand"`
Title string `json:"title"`
TkTotalCommi string `json:"tk_total_commi"`
TkTotalSales string `json:"tk_total_sales"`
Url string `json:"url"`
UserType int `json:"user_type"`
Volume int64 `json:"volume"`
WhiteImage string `json:"white_image"`
XId string `json:"x_id"`
ZkFinalPrice string `json:"zk_final_price"`
CouponShareUrl string `json:"coupon_share_url"`
CouponAmount string `json:"coupon_amount"`
} `json:"map_data"`
} `json:"result_list"`
TotalResults int64 `json:"total_results"`
RequestId string `json:"request_id"`
PageResultKey string `json:"page_result_key,omitempty"`
} `json:"tbk_dg_material_optional_response"`
}
type TbkDgMaterialOptionalResult ¶
type TbkDgMaterialOptionalResult struct {
Result TbkDgMaterialOptionalResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkDgNewuserOrderGetResult ¶
type TbkDgNewuserOrderGetResult struct {
Result TbkDgNewuserOrderGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkDgOptimusMaterialResponse ¶
type TbkDgOptimusMaterialResponse struct {
TbkDgOptimusMaterialResponse struct {
IsDefault string `json:"is_default"`
ResultList struct {
MapData []struct {
CategoryId int `json:"category_id"`
ClickUrl string `json:"click_url"`
CommissionRate string `json:"commission_rate"`
CouponAmount int64 `json:"coupon_amount"`
CouponClickUrl string `json:"coupon_click_url"`
CouponEndTime string `json:"coupon_end_time"`
CouponRemainCount int `json:"coupon_remain_count"`
CouponShareUrl string `json:"coupon_share_url"`
CouponStartFee string `json:"coupon_start_fee"`
CouponStartTime string `json:"coupon_start_time"`
CouponTotalCount int `json:"coupon_total_count"`
CpaRewardType string `json:"cpa_reward_type"`
ItemDescription string `json:"item_description"`
ItemId string `json:"item_id"`
JhsPriceUspList string `json:"jhs_price_usp_list"`
LevelOneCategoryId int64 `json:"level_one_category_id"`
LevelOneCategoryName string `json:"level_one_category_name"`
Nick string `json:"nick"`
PictUrl string `json:"pict_url"`
ReservePrice string `json:"reserve_price"`
SellerId int64 `json:"seller_id"`
ShopTitle string `json:"shop_title"`
ShortTitle string `json:"short_title"`
SmallImages struct {
String []string `json:"string"`
} `json:"small_images"`
SubTitle string `json:"sub_title"`
Title string `json:"title"`
UserType int `json:"user_type"`
Volume int64 `json:"volume"`
WhiteImage string `json:"white_image"`
ZkFinalPrice string `json:"zk_final_price"`
} `json:"map_data"`
} `json:"result_list"`
RequestId string `json:"request_id"`
TotalCount int64 `json:"total_count,omitempty"`
} `json:"tbk_dg_optimus_material_response"`
}
type TbkDgOptimusMaterialResult ¶
type TbkDgOptimusMaterialResult struct {
Result TbkDgOptimusMaterialResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkItemInfoGetResponse ¶
type TbkItemInfoGetResponse struct {
TbkItemInfoGetResponse struct {
Results struct {
NTbkItem []struct {
CatLeafName string `json:"cat_leaf_name"`
CatName string `json:"cat_name"`
FreeShipment bool `json:"free_shipment"`
HotFlag string `json:"hot_flag"`
ItemUrl string `json:"item_url"`
JuOnlineEnd string `json:"ju_online_end"`
JuOnlineStartTime string `json:"ju_online_start_time"`
JuPreShowEndTime string `json:"ju_pre_show_end_time"`
JuPreShowStartTime string `json:"ju_pre_show_start_time"`
MaterialLibType string `json:"material_lib_type"`
Nick string `json:"nick"`
NumIid int64 `json:"num_iid"`
PictUrl string `json:"pict_url"`
PresaleDeposit string `json:"presale_deposit"`
PresaleEndTime int `json:"presale_end_time"`
PresaleStartTime int `json:"presale_start_time"`
PresaleTailEndTime int `json:"presale_tail_end_time"`
PresaleTailStartTime int `json:"presale_tail_start_time"`
Provcity string `json:"provcity"`
ReservePrice string `json:"reserve_price"`
SellerId int64 `json:"seller_id"`
SmallImages struct {
String []string `json:"string"`
} `json:"small_images"`
SuperiorBrand string `json:"superior_brand"`
Title string `json:"title"`
TmallPllPlayActivityStartTime int `json:"tmall_pll_play_activity_start_time"`
UserType int `json:"user_type"`
Volume int64 `json:"volume"`
ZkFinalPrice string `json:"zk_final_price"`
} `json:"n_tbk_item"`
} `json:"results"`
RequestId string `json:"request_id"`
} `json:"tbk_item_info_get_response"`
}
type TbkItemInfoGetResult ¶
type TbkItemInfoGetResult struct {
Result TbkItemInfoGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkOrderDetailsGetResponse ¶
type TbkOrderDetailsGetResponse struct {
TbkOrderDetailsGetResponse struct {
Data struct {
HasNext bool `json:"has_next"`
HasPre bool `json:"has_pre"`
PageNo int `json:"page_no"`
PageSize int `json:"page_size"`
PositionIndex string `json:"position_index"`
Results struct {
PublisherOrderDto []struct {
AdzoneId int64 `json:"adzone_id"`
AdzoneName string `json:"adzone_name"`
AlimamaRate string `json:"alimama_rate"`
AlimamaShareFee string `json:"alimama_share_fee"`
AlipayTotalPrice string `json:"alipay_total_price"`
ClickTime string `json:"click_time"`
DepositPrice string `json:"deposit_price"`
FlowSource string `json:"flow_source"`
IncomeRate string `json:"income_rate"`
IsLx string `json:"is_lx"`
ItemCategoryName string `json:"item_category_name"`
ItemImg string `json:"item_img"`
ItemNum int `json:"item_num"`
ItemTitle string `json:"item_title"`
MarketingType string `json:"marketing_type"`
ModifiedTime string `json:"modified_time"`
OrderType string `json:"order_type"`
PayPrice string `json:"pay_price"`
PubId int `json:"pub_id"`
PubShareFee string `json:"pub_share_fee"`
PubSharePreFee string `json:"pub_share_pre_fee"`
PubShareRate string `json:"pub_share_rate"`
RefundTag int `json:"refund_tag"`
SellerNick string `json:"seller_nick"`
SellerShopTitle string `json:"seller_shop_title"`
SiteId int `json:"site_id"`
SiteName string `json:"site_name"`
SubsidyFee string `json:"subsidy_fee"`
SubsidyRate string `json:"subsidy_rate"`
SubsidyType string `json:"subsidy_type"`
TbDepositTime string `json:"tb_deposit_time"`
TbPaidTime string `json:"tb_paid_time"`
TerminalType string `json:"terminal_type"`
TkCommissionFeeForMediaPlatform string `json:"tk_commission_fee_for_media_platform"`
TkCommissionPreFeeForMediaPlatform string `json:"tk_commission_pre_fee_for_media_platform"`
TkCommissionRateForMediaPlatform string `json:"tk_commission_rate_for_media_platform"`
TkCreateTime string `json:"tk_create_time"`
TkDepositTime string `json:"tk_deposit_time"`
TkEarningTime string `json:"tk_earning_time"`
TkOrderRole int `json:"tk_order_role"`
TkPaidTime string `json:"tk_paid_time"`
TkStatus int `json:"tk_status"`
TkTotalRate string `json:"tk_total_rate"`
TotalCommissionFee string `json:"total_commission_fee"`
TotalCommissionRate string `json:"total_commission_rate"`
TradeId string `json:"trade_id"`
TradeParentId string `json:"trade_parent_id"`
} `json:"publisher_order_dto"`
} `json:"results"`
} `json:"data"`
RequestId string `json:"request_id"`
} `json:"tbk_order_details_get_response"`
}
type TbkOrderDetailsGetResult ¶
type TbkOrderDetailsGetResult struct {
Result TbkOrderDetailsGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkShopGetResponse ¶
type TbkShopGetResponse struct {
TbkShopGetResponse struct {
Results struct {
NTbkShop []struct {
PictUrl string `json:"pict_url"`
SellerNick string `json:"seller_nick"`
ShopTitle string `json:"shop_title"`
ShopType string `json:"shop_type"`
ShopUrl string `json:"shop_url"`
UserId int64 `json:"user_id"`
} `json:"n_tbk_shop"`
} `json:"results"`
TotalResults int `json:"total_results"`
RequestId string `json:"request_id"`
} `json:"tbk_shop_get_response"`
}
type TbkShopGetResult ¶
type TbkShopGetResult struct {
Result TbkShopGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkShopRecommendGetResponse ¶
type TbkShopRecommendGetResponse struct {
TbkShopRecommendGetResponse struct {
Results struct {
NTbkShop []struct {
UserId int `json:"user_id"`
ShopTitle string `json:"shop_title"`
ShopType string `json:"shop_type"`
SellerNick string `json:"seller_nick"`
PictUrl string `json:"pict_url"`
ShopUrl string `json:"shop_url"`
} `json:"n_tbk_shop"`
} `json:"results"`
} `json:"tbk_shop_recommend_get_response"`
}
type TbkShopRecommendGetResult ¶
type TbkShopRecommendGetResult struct {
Result TbkShopRecommendGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkSpreadGetResponse ¶
type TbkSpreadGetResponse struct {
TbkSpreadGetResponse struct {
Results struct {
TbkSpread []struct {
Content string `json:"content"`
ErrMsg string `json:"err_msg"`
} `json:"tbk_spread"`
} `json:"results"`
TotalResults int `json:"total_results"`
RequestId string `json:"request_id"`
} `json:"tbk_spread_get_response"`
}
type TbkSpreadGetResult ¶
type TbkSpreadGetResult struct {
Result TbkSpreadGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TbkTPwdCreateResponse ¶
type TbkTPwdCreateResult ¶
type TbkTPwdCreateResult struct {
Result TbkTPwdCreateResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
Source Files
¶
- api.go
- client.go
- config.go
- const.go
- crypto.go
- get.go
- params.go
- request.go
- taobao.tbk.dg.newuser.order.get.go
- taobao.tbk.order.details.get.go
- tbk.activity.info.get.go
- tbk.coupon.get.go
- tbk.dg.material.optional.go
- tbk.dg.optimus.material.go
- tbk.item.info.get.go
- tbk.shop.get.go
- tbk.shop.recommend.get.go
- tbk.spread.get.go
- tbk.tpwd.create.go
- version.go