diff --git a/api/api.go b/api/api.go index 8f94d7e..22d70f2 100644 --- a/api/api.go +++ b/api/api.go @@ -26,12 +26,22 @@ type APIHeader struct { } // DoCustomRequest Executes a Custom Request and returns a APIResponse +// +// Deprecated: DoCustomRequest is deprecated. Use DoCustomRequestV5 instead func (c *Client) DoCustomRequest(ctx context.Context, method, path, version string, body interface{}, opts interface{}) (*APIResponse, error) { _, response, err := c.DoCustomRequestAndReturnRawResponse(ctx, method, path, version, body, opts) return response, err } +// DoCustomRequestV5 Executes a Custom Request and returns a APIResponse +func (c *Client) DoCustomRequestV5(ctx context.Context, method, path string, body interface{}, opts interface{}) (*APIResponse, error) { + _, response, err := c.DoCustomRequestAndReturnRawResponseV5(ctx, method, path, body, opts) + return response, err +} + // DoCustomRequestAndReturnRawResponse Executes a Custom Request and returns a APIResponse and the Raw HTTP Response +// +// Deprecated: DoCustomRequestAndReturnRawResponse is deprecated. Use DoCustomRequestAndReturnRawResponseV5 instead func (c *Client) DoCustomRequestAndReturnRawResponse(ctx context.Context, method, path, version string, body interface{}, opts interface{}) (*http.Response, *APIResponse, error) { // version is no longer used and is ignored. return c.DoCustomRequestAndReturnRawResponseV5(ctx, method, path, body, opts)