广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wechat_api_md.go 6.4 KiB

3 months ago
3 months ago
1 month ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package md
  2. type GetComponentAccessToken struct {
  3. ComponentAccessToken string `json:"component_access_token" example:"第三方平台 access_token"`
  4. ExpiresIn int `json:"expires_in" example:"有效期,单位:秒"`
  5. }
  6. type GetPreAuthCode struct {
  7. PreAuthCode string `json:"pre_auth_code" example:"预授权码"`
  8. ExpiresIn int `json:"expires_in" example:"有效期,单位:秒"`
  9. }
  10. type GetAuthorizerAccessTokenByAuthCode struct {
  11. AuthorizationInfo struct {
  12. AuthorizerAppid string `json:"authorizer_appid" example:"授权方 appid"`
  13. AuthorizerAccessToken string `json:"authorizer_access_token" example:"接口调用令牌"`
  14. ExpiresIn int `json:"expires_in" example:"authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒"`
  15. AuthorizerRefreshToken string `json:"authorizer_refresh_token" example:"刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效"`
  16. } `json:"authorization_info" example:"预授权码"`
  17. }
  18. type ApiAuthorizerToken struct {
  19. AuthorizerAccessToken string `json:"authorizer_access_token" example:"接口调用令牌"`
  20. ExpiresIn int `json:"expires_in" example:"authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒"`
  21. AuthorizerRefreshToken string `json:"authorizer_refresh_token" example:"刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效"`
  22. }
  23. type DelAuthorize struct {
  24. ErrCode int `json:"errcode" example:"错误码"`
  25. ErrMsg string `json:"errmsg" example:"错误信息"`
  26. }
  27. type AgencyCreateAdunit struct {
  28. Ret int `json:"ret" example:"错误码"`
  29. ErrMsg string `json:"err_msg" example:"错误信息"`
  30. AdUnitId string `json:"ad_unit_id" example:"广告单元ID"`
  31. }
  32. type AgencyUpdateAdunit struct {
  33. Ret int `json:"ret" example:"错误码"`
  34. ErrMsg string `json:"err_msg" example:"错误信息"`
  35. }
  36. type SetCoverAdposStatus struct {
  37. Ret int `json:"ret" example:"错误码"`
  38. ErrMsg string `json:"err_msg" example:"错误信息"`
  39. }
  40. type GetAdunitList struct {
  41. Ret int `json:"ret" example:"错误码"`
  42. ErrMsg string `json:"err_msg" example:"错误信息"`
  43. AdUnit []struct {
  44. AdSlot string `json:"ad_slot" example:"广告位类型名称"`
  45. AdUnitId string `json:"ad_unit_id" example:"广告单元ID"`
  46. AdUnitName string `json:"ad_unit_name" example:"广告单元名称"`
  47. AdUnitSize []map[string]interface{} `json:"ad_unit_size" example:"广告单元大小"`
  48. AdUnitStatus int `json:"ad_unit_status" example:"广告单元开关状态 1:开启 2:关闭"`
  49. VideoDurationMax int `json:"video_duration_max" example:"广告展示时长最大值"`
  50. VideoDurationMin int `json:"video_duration_min" example:"广告展示时长最小值"`
  51. } `json:"ad_unit"`
  52. TotalNum int `json:"total_num" example:"总广告单元数据量"`
  53. }
  54. type GetAdposDetail struct {
  55. Ret int `json:"ret" example:"错误码"`
  56. ErrMsg string `json:"err_msg" example:"错误信息"`
  57. List []struct {
  58. AdUnitId string `json:"ad_unit_id" example:"广告单元ID"`
  59. AdUnitName string `json:"ad_unit_name" example:"广告单元名称"`
  60. AppId string `json:"appid" example:"授权方 appid"`
  61. StatItem struct {
  62. AdSlot string `json:"ad_slot" example:"广告位类型名称"`
  63. Date string `json:"date" example:"数据日期"`
  64. ExposureCount int64 `json:"exposure_count" example:"曝光量"`
  65. ReqSuccCount int64 `json:"req_succ_count" example:"拉取量"`
  66. PublisherIncome int64 `json:"publisher_income" example:"小程序分账收入(分)"`
  67. ClickCount int64 `json:"click_count" example:"点击量"`
  68. Income float64 `json:"income"`
  69. Ecpm float64 `json:"ecpm" example:"广告千次曝光收益(分)"`
  70. ExposureRate float64 `json:"exposure_rate" example:"曝光率"`
  71. ClickRate float64 `json:"click_rate" example:"点击量"`
  72. } `json:"stat_item"`
  73. } `json:"list"`
  74. TotalNum int `json:"total_num" example:"请求返回总数"`
  75. }
  76. type AgencySetBlackListResp struct {
  77. Ret int `json:"ret"` // 错误码
  78. ErrMsg string `json:"err_msg" example:"错误信息"`
  79. }
  80. type AgencyGetBlackListResp struct {
  81. Ret int `json:"ret"` // 错误码
  82. ErrMsg string `json:"err_msg" example:"错误信息"`
  83. BlacklistBiz []struct {
  84. Id string `json:"id" example:"屏蔽公众号微信号"`
  85. Name string `json:"name" example:"屏蔽公众号名称"`
  86. Url string `json:"url" example:"屏蔽公众号头像URL"`
  87. } `json:"blacklist_biz"` // 屏蔽公众号列表
  88. BlacklistWeapp []struct {
  89. Id string `json:"id" example:"屏蔽小程序/小游戏原始ID"`
  90. Name string `json:"name" example:"屏蔽小程序/小游戏名称"`
  91. Url string `json:"url" example:"屏蔽小程序/小游戏头像URL"`
  92. } `json:"blacklist_weapp"` // 屏蔽小程序/小游戏列表
  93. BlacklistIos []struct {
  94. Id string `json:"id" example:"屏蔽IOS应用的APPID"`
  95. Name string `json:"name" example:"屏蔽IOS应用名称"`
  96. Url string `json:"url" example:"屏蔽IOS应用标识图片"`
  97. } `json:"blacklist_ios"` // 屏蔽IOS应用列表
  98. BlacklistAndroid []struct {
  99. Id string `json:"id" example:"屏蔽安卓应用的应用宝包名"`
  100. Name string `json:"name" example:"屏蔽安卓应用的名称"`
  101. Url string `json:"url" example:"屏蔽安卓应用标识图片"`
  102. } `json:"blacklist_android"` // 屏蔽安卓应用列表
  103. }
  104. type SetAmsCategoryBlackListResp struct {
  105. Ret int `json:"ret" example:"错误码"`
  106. ErrMsg string `json:"err_msg" example:"错误信息"`
  107. }
  108. type GetAmsCategoryBlackListResp struct {
  109. Ret int `json:"ret" example:"错误码"`
  110. ErrMsg string `json:"err_msg" example:"错误信息"`
  111. AmsCategory string `json:"ams_category" example:"屏蔽的行业类别"`
  112. }