This commit is contained in:
2025-04-06 03:24:50 +10:00
parent f88ba544c2
commit a8e650e4d7
75 changed files with 1250 additions and 533 deletions

View File

@@ -4,9 +4,19 @@ import (
"fmt"
"net/http"
"net/url"
"github.com/go-resty/resty/v2"
)
type Webhooks struct{ BaseEndpoint }
type Webhooks struct {
request func(URL string, dataBody any) (*resty.Response, error)
}
func NewWebhooks(request func(URL string, dataBody any) (*resty.Response, error)) *Webhooks {
return &Webhooks{
request: request,
}
}
func (a *Webhooks) Register(endpoint EndpointName, secret, callbackUrl string) error {
dataBody := url.Values{}