Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
- func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
- func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- func (c *Client) GetApiKey() string
- func (c *Client) GetLog() *golog.ApiClient
- func (c *Client) JdJyOrderDetails(ctx context.Context, notMustParams ...gorequest.Params) *JdJyOrderDetailsResult
- func (c *Client) JdOrderDetails2(ctx context.Context, notMustParams ...gorequest.Params) *JdJyOrderDetailsResult
- func (c *Client) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- func (c *Client) TbkActivityinfo(ctx context.Context, notMustParams ...gorequest.Params) *TbkActivityinfoResult
- func (c *Client) WaiMaiMeituanGenerateLink(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanGenerateLinkResult
- func (c *Client) WaiMaiMeituanOrderId(ctx context.Context, orderId string, Type int) *WaiMaiMeituanOrderIdResult
- func (c *Client) WaiMaiMeituanOrders(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanOrdersResult
- func (c *Client) WaiMaiMeituanPrivilege(ctx context.Context, sid string, generateWeApp bool, channels int, qrcode bool) *WaiMaiMeituanPrivilegeResult
- func (c *Client) WaiMaiMeituanSgPrivilege(ctx context.Context, sid string, generateWeApp, qrcode bool) *WaiMaiMeituanSgPrivilegeResult
- func (c *Client) WaiMaiMeituanYouxuanGoods(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanYouxuanGoodsResult
- type ClientConfig
- type JdJyOrderDetailsResponse
- type JdJyOrderDetailsResult
- type TbkActivityinfoResponse
- type TbkActivityinfoResult
- type WaiMaiMeituanGenerateLinkResponse
- type WaiMaiMeituanGenerateLinkResult
- type WaiMaiMeituanOrderIdResponse
- type WaiMaiMeituanOrderIdResult
- type WaiMaiMeituanOrdersResponse
- type WaiMaiMeituanOrdersResult
- type WaiMaiMeituanPrivilegeResponse
- type WaiMaiMeituanPrivilegeResult
- type WaiMaiMeituanSgPrivilegeResponse
- type WaiMaiMeituanSgPrivilegeResult
- type WaiMaiMeituanYouxuanGoodsResponse
- type WaiMaiMeituanYouxuanGoodsResult
Constants ¶
const (
LogTable = "dingdanxia"
)
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) ConfigApiClientFun ¶ added in v1.0.52
func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
ConfigApiClientFun 日志配置
func (*Client) ConfigZapClientFun ¶ added in v1.0.141
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
ConfigZapClientFun 日志配置
func (*Client) JdJyOrderDetails ¶ added in v1.0.47
func (c *Client) JdJyOrderDetails(ctx context.Context, notMustParams ...gorequest.Params) *JdJyOrderDetailsResult
JdJyOrderDetails 【官方不维护】 京佣订单
func (*Client) JdOrderDetails2 ¶ added in v1.0.47
func (c *Client) JdOrderDetails2(ctx context.Context, notMustParams ...gorequest.Params) *JdJyOrderDetailsResult
JdOrderDetails2 【官方不维护】 京东联盟订单行查询 https://www.dingdanxia.com/doc/180/94
func (*Client) TbkActivityinfo ¶ added in v1.0.52
func (c *Client) TbkActivityinfo(ctx context.Context, notMustParams ...gorequest.Params) *TbkActivityinfoResult
TbkActivityinfo 官方活动转链,饿了么/口碑活动转链 https://www.dingdanxia.com/doc/122/173
func (*Client) WaiMaiMeituanGenerateLink ¶ added in v1.0.52
func (c *Client) WaiMaiMeituanGenerateLink(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanGenerateLinkResult
WaiMaiMeituanGenerateLink 美团外卖/闪购/酒店/优选CPS转链接口【推荐使用】 https://www.dingdanxia.com/doc/221/173
func (*Client) WaiMaiMeituanOrderId ¶ added in v1.0.47
func (c *Client) WaiMaiMeituanOrderId(ctx context.Context, orderId string, Type int) *WaiMaiMeituanOrderIdResult
WaiMaiMeituanOrderId 美团联盟外卖/闪购/优选/酒店订单查询API(订单号版) https://www.dingdanxia.com/doc/179/173
func (*Client) WaiMaiMeituanOrders ¶ added in v1.0.47
func (c *Client) WaiMaiMeituanOrders(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanOrdersResult
WaiMaiMeituanOrders 美团联盟外卖/闪购/优选/酒店订单查询API https://www.dingdanxia.com/doc/176/173
func (*Client) WaiMaiMeituanPrivilege ¶ added in v1.0.47
func (c *Client) WaiMaiMeituanPrivilege(ctx context.Context, sid string, generateWeApp bool, channels int, qrcode bool) *WaiMaiMeituanPrivilegeResult
WaiMaiMeituanPrivilege 美团外卖CPS推广API接口 https://www.dingdanxia.com/doc/174/173
func (*Client) WaiMaiMeituanSgPrivilege ¶ added in v1.0.47
func (c *Client) WaiMaiMeituanSgPrivilege(ctx context.Context, sid string, generateWeApp, qrcode bool) *WaiMaiMeituanSgPrivilegeResult
WaiMaiMeituanSgPrivilege 美团闪购CPS推广API接口 https://www.dingdanxia.com/doc/195/173
func (*Client) WaiMaiMeituanYouxuanGoods ¶ added in v1.0.52
func (c *Client) WaiMaiMeituanYouxuanGoods(ctx context.Context, notMustParams ...gorequest.Params) *WaiMaiMeituanYouxuanGoodsResult
WaiMaiMeituanYouxuanGoods 优选商品查询API【2022年1月17日暂停数据访问】 https://www.dingdanxia.com/doc/235/173
type ClientConfig ¶ added in v1.0.52
type ClientConfig struct {
ApiKey string // 密钥
}
ClientConfig 实例配置
type JdJyOrderDetailsResponse ¶ added in v1.0.44
type JdJyOrderDetailsResponse struct {
Code int `json:"code"`
Msg string `json:"msg"` // 描述
TotalResults int `json:"total_results"` // 总条数
Data []struct {
Orderid string `json:"orderid"` // 订单ID
Paytime string `json:"paytime"` // 订单支付时间
Payprice string `json:"payprice"` // 订单支付金额
Profit string `json:"profit"` // 订单返佣金额
Smstitle string `json:"smstitle"` // 订单标题
Sid string `json:"sid"` // 渠道方用户唯一标识
Quantity string `json:"quantity"` // 退款笔数
Refundtime string `json:"refundtime"` // 退款时间
Money string `json:"money"` // 退款金额
RefundMoney string `json:"refund_money"` // 退佣金额
CreateTime string `json:"create_time"` // 数据入库更新时间(订单状态改变,该时间会变)
Status int `json:"status"` // 订单状态(1-已提交(已付款)、8-已完成(确认收货)、9-已退款)
Type int `json:"type"` // 订单类型(活动名称)4-外卖 6-闪购 8-优选 2-酒店
} `json:"data"`
}
type JdJyOrderDetailsResult ¶ added in v1.0.32
type JdJyOrderDetailsResult struct {
Result JdJyOrderDetailsResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type TbkActivityinfoResponse ¶ added in v1.0.52
type TbkActivityinfoResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
ClickUrl string `json:"click_url"`
WxQrcodeUrl string `json:"wx_qrcode_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"`
Tpwd string `json:"tpwd"`
LongTpwd string `json:"long_tpwd"`
} `json:"data"`
}
type TbkActivityinfoResult ¶ added in v1.0.52
type TbkActivityinfoResult struct {
Result TbkActivityinfoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanGenerateLinkResponse ¶ added in v1.0.52
type WaiMaiMeituanGenerateLinkResult ¶ added in v1.0.52
type WaiMaiMeituanGenerateLinkResult struct {
Result WaiMaiMeituanGenerateLinkResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanOrderIdResponse ¶ added in v1.0.47
type WaiMaiMeituanOrderIdResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Order struct {
OrderId string `json:"orderId"` // 订单号
Sid string `json:"sid"` // 合作方唯一标识
Payprice string `json:"payprice"` // 订单用户实际支付金额
Profit string `json:"profit"` // 订单预估返佣金额
CpaProfit string `json:"cpaProfit"` // 订单预估cpa总收益(优选、话费券)
Smstitle string `json:"smstitle"` // 订单标题
Status int `json:"status"` // 订单状态,外卖、话费、闪购、优选、酒店订单会返回该字段 1 已付款 8 已完成 9 已退款或风控
TradeTypeList []int `json:"tradeTypeList"` // 订单的奖励类型 话费订单类型返回该字段 3 首购奖励 5 留存奖励 优选订单类型返回该字段 2 cps 3 首购奖励
RiskOrder interface{} `json:"riskOrder"` // 0表示非风控订单,1表示风控订单
Refundprofit interface{} `json:"refundprofit"` // 订单需要扣除的返佣金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段
CpaRefundProfit interface{} `json:"cpaRefundProfit"` // 订单需要扣除的cpa返佣金额(优选、话费券)
RefundInfoList struct {
RefundPrice interface{} `json:"refundPrice"` // 订单实际退款金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段
RefundTime interface{} `json:"refundTime"` // 订单退款时间,10位时间戳
RefundType interface{} `json:"refundType"` // ALL_REFUND(1, "全部退"), PART_REFUND(2, "部分退"), RISK_REFUND(3, "风控退");
} `json:"refundInfoList,omitempty"` // 退款列表
RefundProfitList struct {
RefundProfit interface{} `json:"refundProfit"` // 退款佣金
RefundFinishTime interface{} `json:"refundFinishTime"` // 佣金产生时间,10位时间戳
Type interface{} `json:"type"` // 券订单: 1 流量订单: 2 首单: 3 复购: 4 留存: 5 二单: 6 唤起: 7
} `json:"refundProfitList,omitempty"`
BusinessLine int `json:"businessLine"`
SubBusinessLine int `json:"subBusinessLine"`
ActId int `json:"actId"`
Quantity int `json:"quantity"`
Paytime string `json:"paytime"`
ModTime string `json:"modTime"`
Appkey string `json:"appkey"`
Extra interface{} `json:"extra"`
} `json:"order"`
} `json:"data"`
}
type WaiMaiMeituanOrderIdResult ¶ added in v1.0.47
type WaiMaiMeituanOrderIdResult struct {
Result WaiMaiMeituanOrderIdResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanOrdersResponse ¶ added in v1.0.47
type WaiMaiMeituanOrdersResponse struct {
Code int `json:"code"`
Msg string `json:"msg"` // 描述
TotalResults int `json:"total_results"` // 总条数
Data []struct {
Orderid string `json:"orderid"` // 订单ID
Paytime string `json:"paytime"` // 订单支付时间
Payprice string `json:"payprice"` // 订单支付金额
Profit string `json:"profit"` // 订单返佣金额
Smstitle string `json:"smstitle"` // 订单标题
Sid string `json:"sid"` // 渠道方用户唯一标识
Quantity string `json:"quantity"` // 退款笔数
Refundtime string `json:"refundtime"` // 退款时间
Money string `json:"money"` // 退款金额
RefundMoney string `json:"refund_money"` // 退佣金额
CreateTime string `json:"create_time"` // 数据入库更新时间(订单状态改变,该时间会变)
Status int `json:"status"` // 订单状态(1-已提交(已付款)、8-已完成(确认收货)、9-已退款)
Type int `json:"type"` // 订单类型(活动名称)4-外卖 6-闪购 8-优选 2-酒店
} `json:"data"`
}
type WaiMaiMeituanOrdersResult ¶ added in v1.0.47
type WaiMaiMeituanOrdersResult struct {
Result WaiMaiMeituanOrdersResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanPrivilegeResponse ¶ added in v1.0.47
type WaiMaiMeituanPrivilegeResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
H5 string `json:"h5"` // H5 领券
ShortH5 string `json:"short_h5"` // H5 领券短链接
Deeplink string `json:"deeplink"` // Deeplink领券
H5Evoke string `json:"h5_evoke"` // H5 内唤起页
Qrcode string `json:"qrcode"` // 二维码海报图片路径
Tkl string `json:"tkl"` // 团口令
WeAppInfo struct {
AppId string `json:"app_id"` // 小程序ID
PagePath string `json:"page_path"` // 小程序路径
MiniCode string `json:"miniCode"` // 小程序码
} `json:"we_app_info"` // 小程序信息
} `json:"data"`
}
type WaiMaiMeituanPrivilegeResult ¶ added in v1.0.47
type WaiMaiMeituanPrivilegeResult struct {
Result WaiMaiMeituanPrivilegeResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanSgPrivilegeResponse ¶ added in v1.0.47
type WaiMaiMeituanSgPrivilegeResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
H5 string `json:"h5"` // H5 领券
Deeplink string `json:"deeplink"` // Deeplink领券
H5Evoke string `json:"h5_evoke"` // H5 内唤起页
ShortH5 string `json:"short_h5"` // h5短连接
WeAppInfo struct {
AppId string `json:"app_id"` // 小程序ID
PagePath string `json:"page_path"` // 小程序路径
MiniCode string `json:"miniCode"` // 小程序码
} `json:"we_app_info"` // 小程序信息
Qrcode string `json:"qrcode"` // 海报
} `json:"data"`
}
type WaiMaiMeituanSgPrivilegeResult ¶ added in v1.0.47
type WaiMaiMeituanSgPrivilegeResult struct {
Result WaiMaiMeituanSgPrivilegeResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}
type WaiMaiMeituanYouxuanGoodsResponse ¶ added in v1.0.52
type WaiMaiMeituanYouxuanGoodsResult ¶ added in v1.0.52
type WaiMaiMeituanYouxuanGoodsResult struct {
Result WaiMaiMeituanYouxuanGoodsResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
Err error // 错误
}