Documentation ¶
Index ¶
- type ClearQuotaByAppSecretRequest
- type ClearQuotaByAppSecretResponse
- type ClearQuotaRequest
- type ClearQuotaResponse
- type GetApiQuotaRequest
- type GetApiQuotaResponse
- type GetRidInfoRequest
- type GetRidInfoResponse
- type OpenApi
- func (cli *OpenApi) ClearQuota(req *ClearQuotaRequest) (*ClearQuotaResponse, error)
- func (cli *OpenApi) ClearQuotaByAppSecret(req *ClearQuotaByAppSecretRequest) (*ClearQuotaByAppSecretResponse, error)
- func (cli *OpenApi) GetApiQuota(req *GetApiQuotaRequest) (*GetApiQuotaResponse, error)
- func (cli *OpenApi) GetRidInfo(req *GetRidInfoRequest) (*GetRidInfoResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClearQuotaByAppSecretResponse ¶
type ClearQuotaByAppSecretResponse struct {
request.CommonError
}
type ClearQuotaRequest ¶
type ClearQuotaRequest struct { // 必填 要被清空的账号的appid Appid string `json:"appid"` }
type ClearQuotaResponse ¶
type ClearQuotaResponse struct {
request.CommonError
}
type GetApiQuotaRequest ¶
type GetApiQuotaRequest struct { // @必填 // api的请求地址,例如"/cgi-bin/message/custom/send";不要前缀“https://api.weixin.qq.com” ,也不要漏了"/",否则都会76003的报错 CgiPath string `json:"cgi_path"` }
type GetApiQuotaResponse ¶
type GetApiQuotaResponse struct { request.CommonError Quota struct { DailyLimit int64 `json:"daily_limit"` // 当天该账号可调用该接口的次数 Used int64 `json:"used"` // 当天已经调用的次数 Remain int64 `json:"remain"` // 当天剩余调用次数 RateLimit struct { CallCount int64 `json:"call_count"` // 周期内可调用数量,单位 次 RefreshSecond int64 `json:"refresh_second"` // 更新周期,单位 秒 } `json:"rate_limit"` // 普通调用频率限制 ComponentRateLimit struct { CallCount int64 `json:"call_count"` // 周期内可调用数量,单位 次 RefreshSecond int64 `json:"refresh_second"` // 更新周期,单位 秒 } `json:"component_rate_limit"` // 代调用频率限制 } `json:"quota"` // quota详情 }
type GetRidInfoRequest ¶
type GetRidInfoRequest struct { // @必填 // 调用接口报错返回的rid Rid string `json:"rid"` }
type GetRidInfoResponse ¶
type GetRidInfoResponse struct { request.CommonError Request struct { InvokeTime int64 `json:"invoke_time"` // 发起请求的时间戳 CostInMs int64 `json:"cost_in_ms"` // 请求毫秒级耗时 RequestURL string `json:"request_url"` // 请求的URL参数 RequestBody string `json:"request_body"` // post请求的请求参数 ResponseBody string `json:"response_body"` // 接口请求返回参数 ClientIP string `json:"client_ip"` // 接口请求的客户端ip } `json:"request"` // 该rid对应的请求详情 }
type OpenApi ¶
type OpenApi struct {
// contains filtered or unexported fields
}
func NewOpenApi ¶
func (*OpenApi) ClearQuota ¶
func (cli *OpenApi) ClearQuota(req *ClearQuotaRequest) (*ClearQuotaResponse, error)
重置API调用次数 doc: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/clearQuota.html
func (*OpenApi) ClearQuotaByAppSecret ¶
func (cli *OpenApi) ClearQuotaByAppSecret(req *ClearQuotaByAppSecretRequest) (*ClearQuotaByAppSecretResponse, error)
使用AppSecret重置 API 调用次数 doc: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/clearQuotaByAppSecret.html
func (*OpenApi) GetApiQuota ¶
func (cli *OpenApi) GetApiQuota(req *GetApiQuotaRequest) (*GetApiQuotaResponse, error)
查询API调用额度 doc: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getApiQuota.html
func (*OpenApi) GetRidInfo ¶
func (cli *OpenApi) GetRidInfo(req *GetRidInfoRequest) (*GetRidInfoResponse, error)
查询rid信息 doc: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getRidInfo.html
Click to show internal directories.
Click to hide internal directories.