go-mockid/vendor/github.com/mailgun/mailgun-go/v3/limits.go

19 lines
510 B
Go
Raw Normal View History

2020-05-13 06:12:33 +00:00
package mailgun
import "context"
type TagLimits struct {
Limit int `json:"limit"`
Count int `json:"count"`
}
// GetTagLimits returns tracking settings for a domain
func (mg *MailgunImpl) GetTagLimits(ctx context.Context, domain string) (TagLimits, error) {
r := newHTTPRequest(generatePublicApiUrl(mg, domainsEndpoint) + "/" + domain + "/limits/tag")
r.setClient(mg.Client())
r.setBasicAuth(basicAuthUser, mg.APIKey())
var resp TagLimits
err := getResponseFromJSON(ctx, r, &resp)
return resp, err
}