Documentation ¶
Index ¶
- Constants
- type ApiErrorT
- type Client
- func (c *Client) CmsPromUrlGenerate(ctx context.Context, notMustParams ...Params) *CmsPromUrlGenerateResult
- func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
- func (c *Client) ConfigPid(pid string) *Client
- func (c *Client) GetClientId() string
- func (c *Client) GetClientSecret() string
- func (c *Client) GetLog() *golog.ApiClient
- func (c *Client) GetMediaId() string
- func (c *Client) GetPid() string
- func (c *Client) GoodsCatsGet(ctx context.Context, parentOptId int) *GoodsCatsGetResult
- func (c *Client) GoodsDetail(ctx context.Context, notMustParams ...Params) *GoodsDetailResult
- func (c *Client) GoodsOptGet(ctx context.Context, parentOptId int) *GoodsOptGetResult
- func (c *Client) GoodsPidGenerate(ctx context.Context, notMustParams ...Params) *GoodsPidGenerateResult
- func (c *Client) GoodsPromotionUrlGenerate(ctx context.Context, notMustParams ...Params) *GoodsPromotionUrlGenerateResult
- func (c *Client) GoodsRecommendGet(ctx context.Context, notMustParams ...Params) *GoodsRecommendGetResult
- func (c *Client) GoodsSearch(ctx context.Context, notMustParams ...Params) *GoodsSearchResult
- func (c *Client) MemberAuthorityQuery(ctx context.Context, notMustParams ...Params) *MemberAuthorityQueryResult
- func (c *Client) OrderDetailGet(ctx context.Context, orderSn string) *OrderDetailGetResult
- func (c *Client) OrderListIncrementGet(ctx context.Context, notMustParams ...Params) *OrderListIncrementGetResult
- func (c *Client) OrderListRangeGet(ctx context.Context, notMustParams ...Params) *OrderListRangeGetResult
- func (c *Client) ResourceUrlGen(ctx context.Context, notMustParams ...Params) *ResourceUrlGenResult
- func (c *Client) RpPromUrlGenerate(ctx context.Context, notMustParams ...Params) *RpPromUrlGenerateResult
- func (c *Client) SalesTipParseInt64(salesTip string) int64
- func (c *Client) Sign(p Params)
- func (c *Client) TopGoodsListQuery(ctx context.Context, notMustParams ...Params) *TopGoodsListQueryResult
- type ClientConfig
- type CmsPromUrlGenerateError
- type CmsPromUrlGenerateResponse
- type CmsPromUrlGenerateResult
- type CommonGenCustomParameters
- type CustomParametersResult
- type ErrResp
- type GoodsCatsGetResponse
- type GoodsCatsGetResult
- type GoodsDetailResponse
- type GoodsDetailResult
- type GoodsOptGetResponse
- type GoodsOptGetResult
- type GoodsPidGenerateResponse
- type GoodsPidGenerateResult
- type GoodsPromotionUrlGenerateResponse
- type GoodsPromotionUrlGenerateResult
- type GoodsRecommendGetResponse
- type GoodsRecommendGetResult
- type GoodsSearchResponse
- type GoodsSearchResult
- type MemberAuthorityQueryResponse
- type MemberAuthorityQueryResult
- type OrderDetailGetResponse
- type OrderDetailGetResult
- type OrderListIncrementGetResponse
- type OrderListIncrementGetResult
- type OrderListRangeGetResponse
- type OrderListRangeGetResult
- type Params
- type ResourceUrlGenError
- type ResourceUrlGenResponse
- type ResourceUrlGenResult
- type RpPromUrlGenerateError
- type RpPromUrlGenerateResponse
- type RpPromUrlGenerateResult
- type TopGoodsListQueryResponse
- type TopGoodsListQueryResult
Constants ¶
const (
LogTable = "pinduoduo"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.0.47
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func NewClient ¶ added in v1.0.47
func NewClient(config *ClientConfig) (*Client, error)
NewClient 创建实例化
func (*Client) CmsPromUrlGenerate ¶ added in v1.0.47
func (c *Client) CmsPromUrlGenerate(ctx context.Context, notMustParams ...Params) *CmsPromUrlGenerateResult
CmsPromUrlGenerate 生成商城-频道推广链接 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.cms.prom.url.generate
func (*Client) ConfigApiClientFun ¶ added in v1.0.52
func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
ConfigApiClientFun 日志配置
func (*Client) GetClientId ¶ added in v1.0.52
func (*Client) GetClientSecret ¶ added in v1.0.52
func (*Client) GetMediaId ¶ added in v1.0.52
func (*Client) GoodsCatsGet ¶ added in v1.0.47
func (c *Client) GoodsCatsGet(ctx context.Context, parentOptId int) *GoodsCatsGetResult
GoodsCatsGet 商品标准类目接口 https://open.pinduoduo.com/application/document/api?id=pdd.goods.cats.get
func (*Client) GoodsDetail ¶ added in v1.0.47
func (c *Client) GoodsDetail(ctx context.Context, notMustParams ...Params) *GoodsDetailResult
GoodsDetail 多多进宝商品详情查询 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.detail
func (*Client) GoodsOptGet ¶ added in v1.0.47
func (c *Client) GoodsOptGet(ctx context.Context, parentOptId int) *GoodsOptGetResult
GoodsOptGet 查询商品标签列表 https://open.pinduoduo.com/application/document/api?id=pdd.goods.opt.get
func (*Client) GoodsPidGenerate ¶ added in v1.0.47
func (c *Client) GoodsPidGenerate(ctx context.Context, notMustParams ...Params) *GoodsPidGenerateResult
GoodsPidGenerate 创建多多进宝推广位 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.pid.generate
func (*Client) GoodsPromotionUrlGenerate ¶ added in v1.0.47
func (c *Client) GoodsPromotionUrlGenerate(ctx context.Context, notMustParams ...Params) *GoodsPromotionUrlGenerateResult
GoodsPromotionUrlGenerate 多多进宝推广链接生成 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.promotion.url.generate
func (*Client) GoodsRecommendGet ¶ added in v1.0.47
func (c *Client) GoodsRecommendGet(ctx context.Context, notMustParams ...Params) *GoodsRecommendGetResult
GoodsRecommendGet 多多进宝商品推荐API https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.recommend.get
func (*Client) GoodsSearch ¶ added in v1.0.47
func (c *Client) GoodsSearch(ctx context.Context, notMustParams ...Params) *GoodsSearchResult
GoodsSearch 多多进宝商品查询 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.search
func (*Client) MemberAuthorityQuery ¶ added in v1.0.47
func (c *Client) MemberAuthorityQuery(ctx context.Context, notMustParams ...Params) *MemberAuthorityQueryResult
MemberAuthorityQuery 查询是否绑定备案 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.search
func (*Client) OrderDetailGet ¶ added in v1.0.47
func (c *Client) OrderDetailGet(ctx context.Context, orderSn string) *OrderDetailGetResult
OrderDetailGet 多多进宝商品查询 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.detail.get
func (*Client) OrderListIncrementGet ¶ added in v1.0.47
func (c *Client) OrderListIncrementGet(ctx context.Context, notMustParams ...Params) *OrderListIncrementGetResult
OrderListIncrementGet 最后更新时间段增量同步推广订单信息 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.list.increment.get
func (*Client) OrderListRangeGet ¶ added in v1.0.47
func (c *Client) OrderListRangeGet(ctx context.Context, notMustParams ...Params) *OrderListRangeGetResult
OrderListRangeGet 用时间段查询推广订单接口 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.list.range.get
func (*Client) ResourceUrlGen ¶ added in v1.0.47
func (c *Client) ResourceUrlGen(ctx context.Context, notMustParams ...Params) *ResourceUrlGenResult
ResourceUrlGen 生成多多进宝频道推广 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.pid.generate
func (*Client) RpPromUrlGenerate ¶ added in v1.0.47
func (c *Client) RpPromUrlGenerate(ctx context.Context, notMustParams ...Params) *RpPromUrlGenerateResult
RpPromUrlGenerate 生成营销工具推广链接 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.rp.prom.url.generate
func (*Client) SalesTipParseInt64 ¶ added in v1.0.47
func (*Client) TopGoodsListQuery ¶ added in v1.0.47
func (c *Client) TopGoodsListQuery(ctx context.Context, notMustParams ...Params) *TopGoodsListQueryResult
TopGoodsListQuery 多多客获取爆款排行商品接口 https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.top.goods.list.query
type ClientConfig ¶ added in v1.0.52
type ClientConfig struct { ClientId string // POP分配给应用的client_id ClientSecret string // POP分配给应用的client_secret MediaId string // 媒体ID Pid string // 推广位 }
ClientConfig 实例配置
type CmsPromUrlGenerateError ¶ added in v1.0.44
type CmsPromUrlGenerateResponse ¶ added in v1.0.44
type CmsPromUrlGenerateResponse struct { CmsPromotionUrlGenerateResponse struct { Total int `json:"total"` UrlList []struct { SingleUrlList struct { TzSchemaUrl string `json:"tz_schema_url"` MobileUrl string `json:"mobile_url"` SchemaUrl string `json:"schema_url"` MobileShortUrl string `json:"mobile_short_url"` WeAppWebViewUrl string `json:"we_app_web_view_url"` Url string `json:"url"` ShortUrl string `json:"short_url"` WeAppWebViewShortUrl string `json:"we_app_web_view_short_url"` } `json:"single_url_list"` MobileUrl string `json:"mobile_url"` Sign string `json:"sign"` WeAppInfo struct { WeAppIconUrl string `json:"we_app_icon_url"` UserName string `json:"user_name"` PagePath string `json:"page_path"` SourceDisplayName string `json:"source_display_name"` Title string `json:"title"` AppId string `json:"app_id"` Desc string `json:"desc"` } `json:"we_app_info"` MobileShortUrl string `json:"mobile_short_url"` WeAppWebViewUrl string `json:"we_app_web_view_url"` Url string `json:"url"` ShortUrl string `json:"short_url"` WeAppWebViewShortUrl string `json:"we_app_web_view_short_url"` } `json:"url_list"` RequestId string `json:"request_id"` } `json:"cms_promotion_url_generate_response"` }
type CmsPromUrlGenerateResult ¶ added in v1.0.44
type CmsPromUrlGenerateResult struct { Result CmsPromUrlGenerateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 Error CmsPromUrlGenerateError // 错误结果 }
type CommonGenCustomParameters ¶ added in v1.0.36
CommonGenCustomParameters 自定义参数
type CustomParametersResult ¶ added in v1.0.36
type GoodsCatsGetResponse ¶ added in v1.0.44
type GoodsCatsGetResponse struct { GoodsCatsGetResponse struct { GoodsCatsList []struct { CatId int `json:"cat_id"` // 商品类目ID CatName string `json:"cat_name"` // 商品类目名称 Level int `json:"level"` // 类目层级,1-一级类目,2-二级类目,3-三级类目,4-四级类目 ParentCatID int `json:"parent_cat_id"` // id所属父类目ID,其中,parent_id=0时为顶级节点 } `json:"goods_cats_list"` } `json:"goods_cats_get_response"` }
type GoodsCatsGetResult ¶ added in v1.0.36
type GoodsCatsGetResult struct { Result GoodsCatsGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsDetailResponse ¶ added in v1.0.44
type GoodsDetailResponse struct { GoodsDetailResponse struct { GoodsDetails []struct { ActivityPromotionRate int `json:"activity_promotion_rate,omitempty"` // 活动佣金比例,千分比(特定活动期间的佣金比例) ActivityTags []int `json:"activity_tags,omitempty"` // 商品活动标记数组,例:[4,7],4-秒杀 7-百亿补贴等 BrandName string `json:"brand_name,omitempty"` // 商品品牌词信息,如“苹果”、“阿迪达斯”、“李宁”等 CashGiftAmount int `json:"cash_gift_amount,omitempty"` // 全局礼金金额,单位分 CatId int `json:"cat_id,omitempty"` // 商品类目ID,使用pdd.goods.cats.get接口获取 CatIds []int `json:"cat_ids,omitempty"` // 商品一~四级类目ID列表 CltCpnBatchSn string `json:"clt_cpn_batch_sn,omitempty"` // 店铺收藏券id CltCpnDiscount int `json:"clt_cpn_discount,omitempty"` // 店铺收藏券面额,单位为分 CltCpnEndTime int `json:"clt_cpn_end_time,omitempty"` // 店铺收藏券截止时间 CltCpnMinAmt int `json:"clt_cpn_min_amt,omitempty"` // 店铺收藏券使用门槛价格,单位为分 CltCpnQuantity int `json:"clt_cpn_quantity,omitempty"` // 店铺收藏券总量 CltCpnRemainQuantity int `json:"clt_cpn_remain_quantity,omitempty"` // 店铺收藏券剩余量 CltCpnStartTime int `json:"clt_cpn_start_time,omitempty"` // 店铺收藏券起始时间 CouponDiscount int64 `json:"coupon_discount,omitempty"` // 优惠券面额,单位为分 CouponEndTime int `json:"coupon_end_time,omitempty"` // 优惠券失效时间,UNIX时间戳 CouponMinOrderAmount int `json:"coupon_min_order_amount,omitempty"` // 优惠券门槛金额,单位为分 CouponRemainQuantity int `json:"coupon_remain_quantity,omitempty"` // 优惠券剩余数量 CouponStartTime int `json:"coupon_start_time,omitempty"` // 优惠券生效时间,UNIX时间戳 CouponTotalQuantity int `json:"coupon_total_quantity,omitempty"` // 优惠券总数量 CreateAt int `json:"create_at,omitempty"` // 创建时间(unix时间戳) DescTxt string `json:"desc_txt,omitempty"` // 描述分 ExtraCouponAmount int `json:"extra_coupon_amount,omitempty"` // 额外优惠券 GoodsDesc string `json:"goods_desc,omitempty"` // 参与多多进宝的商品描述 GoodsGalleryUrls []string `json:"goods_gallery_urls,omitempty"` // 商品轮播图 GoodsImageUrl string `json:"goods_image_url,omitempty"` // 多多进宝商品主图 GoodsName string `json:"goods_name,omitempty"` // 参与多多进宝的商品标题 GoodsSign string `json:"goods_sign,omitempty"` // 商品goodsSign,支持通过goodsSign查询商品。goodsSign是加密后的goodsId, goodsId已下线,请使用goodsSign来替代。使用说明:https://jinbao.pinduoduo.com/qa-system?questionId=252 GoodsThumbnailUrl string `json:"goods_thumbnail_url,omitempty"` // 商品缩略图 HasCoupon bool `json:"has_coupon,omitempty"` // 商品是否有优惠券 true-有,false-没有 HasMallCoupon bool `json:"has_mall_coupon,omitempty"` // 是否有店铺券 LgstTxt string `json:"lgst_txt,omitempty"` // 物流分 MallCouponDiscountPct int64 `json:"mall_coupon_discount_pct,omitempty"` // 店铺折扣 MallCouponEndTime int `json:"mall_coupon_end_time,omitempty"` // 店铺券使用结束时间 MallCouponMaxDiscountAmount int64 `json:"mall_coupon_max_discount_amount,omitempty"` // 最大使用金额 MallCouponMinOrderAmount int64 `json:"mall_coupon_min_order_amount,omitempty"` // 最小使用金额 MallCouponRemainQuantity int `json:"mall_coupon_remain_quantity,omitempty"` // 店铺券余量 MallCouponStartTime int `json:"mall_coupon_start_time,omitempty"` // 店铺券使用开始时间 MallCouponTotalQuantity int `json:"mall_coupon_total_quantity,omitempty"` // 店铺券总量 MallCps int64 `json:"mall_cps,omitempty"` // 该商品所在店铺是否参与全店推广,0:否,1:是 MallId int64 `json:"mall_id,omitempty"` // 商家id MallImgUrl string `json:"mall_img_url,omitempty"` // 店铺logo图 MallName string `json:"mall_name,omitempty"` // 店铺名称 MaterialList []struct { Id string `json:"id,omitempty"` // 素材ID ImageList []string `json:"image_list,omitempty"` // 图片列表 TextList []string `json:"text_list,omitempty"` // 文字列表 ThumbnailUrl string `json:"thumbnail_url,omitempty"` // 视频缩略图 Mtype int `json:"type,omitempty"` // 素材类型,1-图文,2-视频 VideoUrl string `json:"video_url,omitempty"` // 视频url } `json:"material_list"` MerchantType int `json:"merchant_type,omitempty"` // 店铺类型,1-个人,2-企业,3-旗舰店,4-专卖店,5-专营店,6-普通店(未传为全部) MinGroupPrice int64 `json:"min_group_price,omitempty"` // 最低价sku的拼团价,单位为分 MinNormalPrice int64 `json:"min_normal_price,omitempty"` // 最低价sku的单买价,单位为分 OnlySceneAuth bool `json:"only_scene_auth,omitempty"` // 快手专享 OptId int `json:"opt_id,omitempty"` // 商品标签ID,使用pdd.goods.opt.get接口获取 OptIds []int `json:"opt_ids,omitempty"` // 商品标签ID OptName string `json:"opt_name,omitempty"` // 商品标签名称 PlanType int `json:"plan_type,omitempty"` // 推广计划类型: 1-全店推广 2-单品推广 3-定向推广 4-招商推广 5-分销推广 PredictPromotionRate int `json:"predict_promotion_rate,omitempty"` // 比价行为预判定佣金,需要用户备案 PromotionRate int64 `json:"promotion_rate,omitempty"` // 佣金比例,千分比 SalesTip string `json:"sales_tip,omitempty"` // 已售卖件数 ServiceTags []int `json:"service_tags,omitempty"` // 服务标签: 4-送货入户并安装,5-送货入户,6-电子发票,9-坏果包赔,11-闪电退款,12-24小时发货,13-48小时发货,17-顺丰包邮,18-只换不修,1可定制化,29-预约配送,1000001-正品发票,1000002-送货入户并安装 ServTxt string `json:"serv_txt,omitempty"` // 服务分 ShareRate int `json:"share_rate,omitempty"` // 招商分成服务费比例,千分比 SubsidyAmount int `json:"subsidy_amount,omitempty"` // 优势渠道专属商品补贴金额,单位为分。针对优质渠道的补贴活动,指定优势渠道可通过推广该商品获取相应补贴。补贴活动入口:[进宝网站-官方活动-千万补贴],报名入口:https://jinbao.pinduoduo.com/ten-million-subsidy/entry SubsidyDuoAmountTenMillion int `json:"subsidy_duo_amount_ten_million,omitempty"` // 千万补贴给渠道的收入补贴,不允许直接给下级代理展示,单位为分 UnifiedTags []string `json:"unified_tags,omitempty"` // 优惠标签列表,包括:"X元券","比全网低X元","服务费","精选素材","近30天低价","同款低价","同款好评","同款热销","旗舰店","一降到底","招商优选","商家优选","好价再降X元","全站销量XX","实时热销榜第X名","实时好评榜第X名","额外补X元"等 VideoUrls []string `json:"video_urls,omitempty"` // 商品视频url ZsDuoId int `json:"zs_duo_id,omitempty"` // 招商团长id GoodsId int64 `json:"goods_id"` CategoryId int64 `json:"category_id"` CategoryName string `json:"category_name"` } `json:"goods_details"` } `json:"goods_detail_response"` }
type GoodsDetailResult ¶ added in v1.0.36
type GoodsDetailResult struct { Result GoodsDetailResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsOptGetResponse ¶ added in v1.0.44
type GoodsOptGetResponse struct { GoodsOptGetResponse struct { GoodsOptList []struct { Level int `json:"level"` // 层级,1-一级,2-二级,3-三级,4-四级 OptId int `json:"opt_id"` // 商品标签ID OptName string `json:"opt_name"` // 商品标签名 ParentOptId int `json:"parent_opt_id"` // id所属父ID,其中,parent_id=0时为顶级节点 } `json:"goods_opt_list"` } `json:"goods_opt_get_response"` }
type GoodsOptGetResult ¶ added in v1.0.36
type GoodsOptGetResult struct { Result GoodsOptGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsPidGenerateResponse ¶ added in v1.0.44
type GoodsPidGenerateResponse struct { PIdGenerateResponse struct { PIdList []struct { CreateTime int `json:"create_time,omitempty"` // 推广位创建时间 PidName string `json:"pid_name,omitempty"` // 推广位名称 PId string `json:"p_id,omitempty"` // 调用方推广位ID MediaId int `json:"media_id,omitempty"` // 媒体id } `json:"p_id_list"` RemainPidCount int `json:"remain_pid_count"` // PID剩余数量 } `json:"p_id_generate_response"` }
type GoodsPidGenerateResult ¶ added in v1.0.36
type GoodsPidGenerateResult struct { Result GoodsPidGenerateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsPromotionUrlGenerateResponse ¶ added in v1.0.44
type GoodsPromotionUrlGenerateResponse struct { GoodsPromotionUrlGenerateResponse struct { GoodsPromotionUrlList []struct { MobileShortUrl string `json:"mobile_short_url,omitempty"` // 对应出参mobile_url的短链接,与mobile_url功能一致。 MobileUrl string `json:"mobile_url,omitempty"` // 使用此推广链接,用户安装微信的情况下,默认拉起拼多多福利券微信小程序,否则唤起H5页面 QqAppInfo struct { AppId string `json:"app_id,omitempty"` // 拼多多小程序id BannerUrl string `json:"banner_url,omitempty"` // Banner图 Desc string `json:"desc,omitempty"` // 描述 PagePath string `json:"page_path,omitempty"` // 小程序path值 QqAppIconUrl string `json:"qq_app_icon_url,omitempty"` // 小程序icon SourceDisplayName string `json:"source_display_name,omitempty"` // 来源名 Title string `json:"title,omitempty"` // 小程序标题 UserName string `json:"user_name,omitempty"` // 用户名 } `json:"qq_app_info"` SchemaUrl string `json:"schema_url,omitempty"` // 使用此推广链接,用户安装拼多多APP的情况下会唤起APP(需客户端支持schema跳转协议) ShortUrl string `json:"short_url,omitempty"` // 对应出参url的短链接,与url功能一致 Url string `json:"url,omitempty"` // 普通推广长链接,唤起H5页面 WeAppInfo struct { AppId string `json:"app_id,omitempty"` // 小程序id BannerUrl string `json:"banner_url,omitempty"` // Banner图 Desc string `json:"desc,omitempty"` // 描述 PagePath string `json:"page_path,omitempty"` // 小程序path值 SourceDisplayName string `json:"source_display_name,omitempty"` // 来源名 Title string `json:"title,omitempty"` // 小程序标题 UserName string `json:"user_name,omitempty"` // 用户名 WeAppIconUrl string `json:"we_app_icon_url,omitempty"` // 小程序图片 } `json:"we_app_info"` WeixinCode string `json:"weixin_code"` WeAppWebViewUrl string `json:"we_app_web_view_url"` WeAppWebViewShortUrl string `json:"we_app_web_view_short_url"` TzSchemaUrl string `json:"tz_schema_url"` WeixinShortLink string `json:"weixin_short_link"` } `json:"goods_promotion_url_list"` } `json:"goods_promotion_url_generate_response"` }
type GoodsPromotionUrlGenerateResult ¶ added in v1.0.36
type GoodsPromotionUrlGenerateResult struct { Result GoodsPromotionUrlGenerateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsRecommendGetResponse ¶ added in v1.0.44
type GoodsRecommendGetResponse struct { GoodsBasicDetailResponse struct { List []struct { ActivityPromotionRate int `json:"activity_promotion_rate"` ActivityTags []int `json:"activity_tags"` BrandName string `json:"brand_name"` CashGiftAmount int `json:"cash_gift_amount"` CatId string `json:"cat_id"` CatIds []int `json:"cat_ids"` CouponDiscount int64 `json:"coupon_discount"` CouponEndTime int `json:"coupon_end_time"` CouponMinOrderAmount int `json:"coupon_min_order_amount"` CouponPrice int `json:"coupon_price"` CouponRemainQuantity int `json:"coupon_remain_quantity"` CouponStartTime int `json:"coupon_start_time"` CouponTotalQuantity int `json:"coupon_total_quantity"` CreateAt int `json:"create_at"` DescTxt string `json:"desc_txt"` ExtraCouponAmount int `json:"extra_coupon_amount"` GoodsDesc string `json:"goods_desc"` GoodsImageUrl string `json:"goods_image_url"` GoodsLabels []int `json:"goods_labels"` GoodsName string `json:"goods_name"` GoodsRate int `json:"goods_rate"` GoodsSign string `json:"goods_sign"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` GoodsType int `json:"goods_type"` HasCoupon bool `json:"has_coupon"` HasMaterial bool `json:"has_material"` LgstTxt string `json:"lgst_txt"` MallId int64 `json:"mall_id"` MallName string `json:"mall_name"` MarketFee int `json:"market_fee"` MerchantType string `json:"merchant_type"` MinGroupPrice int64 `json:"min_group_price"` MinNormalPrice int `json:"min_normal_price"` OptId string `json:"opt_id"` OptIds []int `json:"opt_ids"` OptName string `json:"opt_name"` PredictPromotionRate int `json:"predict_promotion_rate"` PromotionRate int64 `json:"promotion_rate"` QrCodeImageUrl string `json:"qr_code_image_url"` RealtimeSalesTip string `json:"realtime_sales_tip"` SalesTip string `json:"sales_tip"` SearchId string `json:"search_id"` ServTxt string `json:"serv_txt"` ShareDesc string `json:"share_desc"` ShareRate int `json:"share_rate"` SubsidyAmount int `json:"subsidy_amount"` SubsidyDuoAmountTenMillion int `json:"subsidy_duo_amount_ten_million"` UnifiedTags []string `json:"unified_tags"` GoodsId int64 `json:"goods_id"` CategoryId string `json:"category_id"` CategoryName string `json:"category_name"` } `json:"list"` ListId string `json:"list_id"` SearchId string `json:"search_id"` Total int64 `json:"total"` } `json:"goods_basic_detail_response"` }
type GoodsRecommendGetResult ¶ added in v1.0.36
type GoodsRecommendGetResult struct { Result GoodsRecommendGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type GoodsSearchResponse ¶ added in v1.0.44
type GoodsSearchResponse struct { GoodsSearchResponse struct { GoodsList []struct { ActivityPromotionRate int `json:"activity_promotion_rate"` ActivityTags []int `json:"activity_tags"` ActivityType int `json:"activity_type"` BrandName string `json:"brand_name"` CashGiftAmount int `json:"cash_gift_amount"` CatIds []int `json:"cat_ids"` CltCpnBatchSn string `json:"clt_cpn_batch_sn"` CltCpnDiscount int `json:"clt_cpn_discount"` CltCpnEndTime int `json:"clt_cpn_end_time"` CltCpnMinAmt int `json:"clt_cpn_min_amt"` CltCpnQuantity int `json:"clt_cpn_quantity"` CltCpnRemainQuantity int `json:"clt_cpn_remain_quantity"` CltCpnStartTime int `json:"clt_cpn_start_time"` CouponDiscount int64 `json:"coupon_discount"` CouponEndTime int `json:"coupon_end_time"` CouponMinOrderAmount int `json:"coupon_min_order_amount"` CouponRemainQuantity int `json:"coupon_remain_quantity"` CouponStartTime int `json:"coupon_start_time"` CouponTotalQuantity int `json:"coupon_total_quantity"` CreateAt int `json:"create_at"` DescTxt string `json:"desc_txt"` ExtraCouponAmount int `json:"extra_coupon_amount"` GoodsDesc string `json:"goods_desc"` GoodsImageUrl string `json:"goods_image_url"` GoodsLabels []int `json:"goods_labels"` GoodsName string `json:"goods_name"` GoodsSign string `json:"goods_sign"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` HasCoupon bool `json:"has_coupon"` HasMallCoupon bool `json:"has_mall_coupon"` HasMaterial bool `json:"has_material"` LgstTxt string `json:"lgst_txt"` MallCouponDiscountPct int `json:"mall_coupon_discount_pct"` MallCouponEndTime int `json:"mall_coupon_end_time"` MallCouponId int `json:"mall_coupon_id"` MallCouponMaxDiscountAmount int `json:"mall_coupon_max_discount_amount"` MallCouponMinOrderAmount int `json:"mall_coupon_min_order_amount"` MallCouponRemainQuantity int `json:"mall_coupon_remain_quantity"` MallCouponStartTime int `json:"mall_coupon_start_time"` MallCouponTotalQuantity int `json:"mall_coupon_total_quantity"` MallCps int `json:"mall_cps"` MallId int64 `json:"mall_id"` MallName string `json:"mall_name"` MerchantType int `json:"merchant_type"` MinGroupPrice int64 `json:"min_group_price"` MinNormalPrice int `json:"min_normal_price"` OnlySceneAuth bool `json:"only_scene_auth"` OptId int `json:"opt_id"` OptIds []int `json:"opt_ids"` OptName string `json:"opt_name"` PlanType int `json:"plan_type"` PredictPromotionRate int `json:"predict_promotion_rate"` PromotionRate int64 `json:"promotion_rate"` SalesTip string `json:"sales_tip"` SearchId string `json:"search_id"` ServTxt string `json:"serv_txt"` ServiceTags []int `json:"service_tags"` ShareRate int `json:"share_rate"` SubsidyAmount int `json:"subsidy_amount"` SubsidyDuoAmountTenMillion int `json:"subsidy_duo_amount_ten_million"` UnifiedTags []string `json:"unified_tags"` ZsDuoId int `json:"zs_duo_id"` GoodsId int64 `json:"goods_id"` CategoryId int64 `json:"category_id"` CategoryName string `json:"category_name"` } `json:"goods_list"` ListId string `json:"list_id"` SearchId string `json:"search_id"` TotalCount int64 `json:"total_count"` } `json:"goods_search_response"` }
type GoodsSearchResult ¶ added in v1.0.36
type GoodsSearchResult struct { Result GoodsSearchResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type MemberAuthorityQueryResponse ¶ added in v1.0.44
type MemberAuthorityQueryResult ¶ added in v1.0.44
type MemberAuthorityQueryResult struct { Result MemberAuthorityQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type OrderDetailGetResponse ¶ added in v1.0.44
type OrderDetailGetResponse struct { OrderDetailResponse struct { SepMarketFee int `json:"sep_market_fee"` GoodsPrice int `json:"goods_price"` SepDuoId int `json:"sep_duo_id"` Pid string `json:"pid"` PromotionRate int `json:"promotion_rate"` CpsSign string `json:"cps_sign"` Type int `json:"type"` SubsidyDuoAmountLevel int `json:"subsidy_duo_amount_level"` OrderStatus int `json:"order_status"` CatIds []int `json:"cat_ids"` OrderCreateTime int64 `json:"order_create_time"` IsDirect int `json:"is_direct"` OrderGroupSuccessTime int `json:"order_group_success_time"` MallId int `json:"mall_id"` OrderAmount int64 `json:"order_amount"` PriceCompareStatus int `json:"price_compare_status"` MallName string `json:"mall_name"` OrderModifyAt int `json:"order_modify_at"` AuthDuoId int `json:"auth_duo_id"` CpaNew int `json:"cpa_new"` GoodsName string `json:"goods_name"` BatchNo string `json:"batch_no"` RedPacketType int `json:"red_packet_type"` UrlLastGenerateTime int `json:"url_last_generate_time"` GoodsQuantity int `json:"goods_quantity"` GoodsId int64 `json:"goods_id"` SepParameters string `json:"sep_parameters"` SepRate int `json:"sep_rate"` SubsidyType int `json:"subsidy_type"` ShareRate int `json:"share_rate"` CustomParameters string `json:"custom_parameters"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` PromotionAmount int64 `json:"promotion_amount"` OrderPayTime int `json:"order_pay_time"` GroupId int64 `json:"group_id"` SepPid string `json:"sep_pid"` ReturnStatus int `json:"return_status"` OrderStatusDesc string `json:"order_status_desc"` ShareAmount int `json:"share_amount"` GoodsCategoryName string `json:"goods_category_name"` RequestId string `json:"request_id"` GoodsSign string `json:"goods_sign"` OrderSn string `json:"order_sn"` ZsDuoId int `json:"zs_duo_id"` } `json:"order_detail_response"` }
type OrderDetailGetResult ¶ added in v1.0.44
type OrderDetailGetResult struct { Result OrderDetailGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type OrderListIncrementGetResponse ¶ added in v1.0.44
type OrderListIncrementGetResponse struct { OrderListGetResponse struct { TotalCount int `json:"total_count"` OrderList []struct { SepMarketFee int `json:"sep_market_fee"` GoodsPrice int64 `json:"goods_price"` SepDuoId int `json:"sep_duo_id"` PromotionRate int64 `json:"promotion_rate"` Type int `json:"type"` SubsidyDuoAmountLevel int `json:"subsidy_duo_amount_level"` CatIds []int `json:"cat_ids"` OrderStatus int `json:"order_status"` OrderCreateTime int64 `json:"order_create_time"` IsDirect int `json:"is_direct"` OrderGroupSuccessTime int `json:"order_group_success_time"` MallId int `json:"mall_id"` OrderAmount int64 `json:"order_amount"` PriceCompareStatus int `json:"price_compare_status"` OrderModifyAt int `json:"order_modify_at"` AuthDuoId int `json:"auth_duo_id"` CpaNew int `json:"cpa_new"` GoodsName string `json:"goods_name"` BatchNo string `json:"batch_no"` RedPacketType int `json:"red_packet_type"` GoodsQuantity int `json:"goods_quantity"` FailReason string `json:"fail_reason,omitempty"` GoodsId int64 `json:"goods_id"` SepParameters string `json:"sep_parameters"` SepRate int `json:"sep_rate"` SubsidyType int `json:"subsidy_type"` CustomParameters string `json:"custom_parameters"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` ShareRate int `json:"share_rate"` PromotionAmount int64 `json:"promotion_amount"` OrderPayTime int64 `json:"order_pay_time"` OrderReceiveTime int64 `json:"order_receive_time"` OrderSettleTime int64 `json:"order_settle_time"` ActivityTags []int `json:"activity_tags"` GroupId int64 `json:"group_id"` SepPid string `json:"sep_pid"` OrderStatusDesc string `json:"order_status_desc"` ShareAmount int `json:"share_amount"` OrderId string `json:"order_id"` GoodsSign string `json:"goods_sign"` OrderSn string `json:"order_sn"` OrderVerifyTime int64 `json:"order_verify_time"` PId string `json:"p_id"` ZsDuoId int `json:"zs_duo_id"` } `json:"order_list"` RequestId string `json:"request_id"` } `json:"order_list_get_response"` }
type OrderListIncrementGetResult ¶ added in v1.0.36
type OrderListIncrementGetResult struct { Result OrderListIncrementGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type OrderListRangeGetResponse ¶ added in v1.0.44
type OrderListRangeGetResponse struct { OrderListGetResponse struct { TotalCount int `json:"total_count"` OrderList []struct { SepMarketFee int `json:"sep_market_fee"` GoodsPrice int64 `json:"goods_price"` SepDuoId int `json:"sep_duo_id"` PromotionRate int64 `json:"promotion_rate"` Type int `json:"type"` SubsidyDuoAmountLevel int `json:"subsidy_duo_amount_level"` CatIds []int `json:"cat_ids"` OrderStatus int `json:"order_status"` OrderCreateTime int64 `json:"order_create_time"` IsDirect int `json:"is_direct"` OrderGroupSuccessTime int `json:"order_group_success_time"` MallId int `json:"mall_id"` OrderAmount int64 `json:"order_amount"` PriceCompareStatus int `json:"price_compare_status"` OrderModifyAt int `json:"order_modify_at"` AuthDuoId int `json:"auth_duo_id"` CpaNew int `json:"cpa_new"` GoodsName string `json:"goods_name"` BatchNo string `json:"batch_no"` RedPacketType int `json:"red_packet_type"` GoodsQuantity int `json:"goods_quantity"` FailReason string `json:"fail_reason,omitempty"` GoodsId int64 `json:"goods_id"` SepParameters string `json:"sep_parameters"` SepRate int `json:"sep_rate"` SubsidyType int `json:"subsidy_type"` CustomParameters string `json:"custom_parameters"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` ShareRate int `json:"share_rate"` PromotionAmount int64 `json:"promotion_amount"` OrderPayTime int64 `json:"order_pay_time"` OrderReceiveTime int64 `json:"order_receive_time"` OrderSettleTime int64 `json:"order_settle_time"` ActivityTags []int `json:"activity_tags"` GroupId int64 `json:"group_id"` SepPid string `json:"sep_pid"` OrderStatusDesc string `json:"order_status_desc"` ShareAmount int `json:"share_amount"` OrderId string `json:"order_id"` GoodsSign string `json:"goods_sign"` OrderSn string `json:"order_sn"` OrderVerifyTime int64 `json:"order_verify_time"` PId string `json:"p_id"` ZsDuoId int `json:"zs_duo_id"` } `json:"order_list"` RequestId string `json:"request_id"` } `json:"order_list_get_response"` }
type OrderListRangeGetResult ¶ added in v1.0.44
type OrderListRangeGetResult struct { Result OrderListRangeGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type Params ¶ added in v1.0.36
type Params map[string]interface{}
Params 请求参数
func NewParamsWithType ¶ added in v1.0.36
func (Params) SetCustomParameters ¶ added in v1.0.36
func (Params) SetGoodsSignList ¶ added in v1.0.44
SetGoodsSignList 设置商品goodsSign列表
type ResourceUrlGenError ¶ added in v1.0.44
type ResourceUrlGenResponse ¶ added in v1.0.44
type ResourceUrlGenResponse struct { ResourceUrlResponse struct { MultiUrlList struct { ShortUrl string `json:"short_url"` // 频道推广短链接 Url string `json:"url"` // 频道推广长链接 } `json:"multi_url_list"` // 多人团链接 Sign string `json:"sign,omitempty"` // sign SingleUrlList struct { ShortUrl string `json:"short_url"` // 频道推广短链接 Url string `json:"url"` // 频道推广长链接 } `json:"single_url_list"` // 单人团链接 WeAppInfo struct { AppId string `json:"app_id"` // 小程序id BannerUrl string `json:"banner_url"` // Banner图 Desc string `json:"desc"` // 描述 PagePath string `json:"page_path"` // 小程序path值 SourceDisplayName string `json:"source_display_name"` // 来源名 Title string `json:"title"` // 小程序标题 UserName string `json:"user_name"` // 用户名 WeAppIconUrl string `json:"we_app_icon_url"` // 小程序icon } `json:"we_app_info"` // 拼多多福利券微信小程序信息 } `json:"resource_url_response"` }
type ResourceUrlGenResult ¶ added in v1.0.36
type ResourceUrlGenResult struct { Result ResourceUrlGenResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 Error ResourceUrlGenError // 错误结果 }
type RpPromUrlGenerateError ¶ added in v1.0.44
type RpPromUrlGenerateResponse ¶ added in v1.0.44
type RpPromUrlGenerateResponse struct { RpPromotionUrlGenerateResponse struct { ResourceList []struct { Desc string `json:"desc"` // 活动描述 Url string `json:"url"` // 活动地址 } `json:"resource_list"` UrlList []struct { MobileShortUrl string `json:"mobile_short_url"` // 推广移动短链接,对应出参mobile_url的短链接,与mobile_url功能一致。 MobileUrl string `json:"mobile_url"` // 推广移动链接,用户安装拼多多APP的情况下会唤起APP,否则唤起H5页面 MultiGroupMobileShortUrl string `json:"multi_group_mobile_short_url"` // 推广多人团移动短链接 MultiGroupMobileUrl string `json:"multi_group_mobile_url"` // 推广多人团移动链接,用户安装拼多多APP的情况下会唤起APP,否则唤起H5页面 MultiGroupShortUrl string `json:"multi_group_short_url"` // 推广多人团短链接 MultiGroupUrl string `json:"multi_group_url"` // 推广多人团链接,唤起H5页面 QqAppInfo struct { AppId string `json:"app_id"` // 拼多多小程序id BannerUrl string `json:"banner_url"` // Banner图 Desc string `json:"desc"` // 描述 PagePath string `json:"page_path"` // 小程序path值 QqAppIconUrl string `json:"qq_app_icon_url"` // 小程序icon SourceDisplayName string `json:"source_display_name"` // 来源名 Title string `json:"title"` // 小程序标题 UserName string `json:"user_name"` // 用户名 } `json:"qq_app_info"` // qq小程序信息 SchemaUrl string `json:"schema_url"` // schema链接,用户安装拼多多APP的情况下会唤起APP(需客户端支持schema跳转协议) ShortUrl string `json:"short_url"` // 推广短链接,对应出参url的短链接,与url功能一致 Url string `json:"url"` // 普通推广长链接,唤起H5页面 WeAppInfo struct { AppId string `json:"app_id"` // 小程序id BannerUrl string `json:"banner_url"` // Banner图 Desc string `json:"desc"` // 描述 PagePath string `json:"page_path"` // 小程序path值 SourceDisplayName string `json:"source_display_name"` // 来源名 Title string `json:"title"` // 小程序标题 UserName string `json:"user_name"` // 用户名 WeAppIconUrl string `json:"we_app_icon_url"` // 小程序icon } `json:"we_app_info"` // 拼多多福利券微信小程序信息 } `json:"url_list"` } `json:"rp_promotion_url_generate_response"` }
type RpPromUrlGenerateResult ¶ added in v1.0.36
type RpPromUrlGenerateResult struct { Result RpPromUrlGenerateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 Error RpPromUrlGenerateError // 错误结果 }
type TopGoodsListQueryResponse ¶ added in v1.0.44
type TopGoodsListQueryResponse struct { TopGoodsListGetResponse struct { List []struct { CatIds []int `json:"cat_ids"` CouponDiscount int `json:"coupon_discount"` CouponEndTime int `json:"coupon_end_time"` CouponMinOrderAmount int `json:"coupon_min_order_amount"` CouponRemainQuantity int `json:"coupon_remain_quantity"` CouponStartTime int `json:"coupon_start_time"` CouponTotalQuantity int `json:"coupon_total_quantity"` DescTxt string `json:"desc_txt"` GoodsDesc string `json:"goods_desc"` GoodsGalleryUrls []string `json:"goods_gallery_urls"` GoodsId int64 `json:"goods_id"` GoodsImageUrl string `json:"goods_image_url"` GoodsName string `json:"goods_name"` GoodsSign string `json:"goods_sign"` GoodsThumbnailUrl string `json:"goods_thumbnail_url"` LgstTxt string `json:"lgst_txt"` MallId int64 `json:"mall_id"` MallName string `json:"mall_name"` MerchantType string `json:"merchant_type"` MinGroupPrice int `json:"min_group_price"` MinNormalPrice int `json:"min_normal_price"` OptId int `json:"opt_id"` OptIds []int `json:"opt_ids"` OptName string `json:"opt_name"` PredictPromotionRate int `json:"predict_promotion_rate"` PromotionRate int `json:"promotion_rate"` SalesTip string `json:"sales_tip"` SearchId string `json:"search_id"` ServTxt string `json:"serv_txt"` ShareRate int `json:"share_rate"` CategoryId int64 `json:"category_id"` CategoryName string `json:"category_name"` } `json:"list"` ListId string `json:"list_id"` SearchId string `json:"search_id"` Total int64 `json:"total"` } `json:"top_goods_list_get_response"` }
type TopGoodsListQueryResult ¶ added in v1.0.44
type TopGoodsListQueryResult struct { Result TopGoodsListQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
Source Files ¶
- client.go
- config.go
- const.go
- crypto.go
- get.go
- param.go
- params.go
- pdd.ddk.cms.prom.url.generate.go
- pdd.ddk.goods.detail.go
- pdd.ddk.goods.pid.generate.go
- pdd.ddk.goods.promotion.url.generate.go
- pdd.ddk.goods.recommend.get.go
- pdd.ddk.goods.search.go
- pdd.ddk.member.authority.query.go
- pdd.ddk.order.detail.get.go
- pdd.ddk.order.list.increment.get.go
- pdd.ddk.order.list.range.get.go
- pdd.ddk.resource.url.gen.go
- pdd.ddk.rp.prom.url.generate.go
- pdd.ddk.top.goods.list.query.go
- pdd.goods.cats.get.go
- pdd.goods.opt.get.go
- request.go