Skip to content

Commit 3d3aff4

Browse files
committed
chore(api): no-op WithApiV2() to avoid breaking changes
Signed-off-by: Salim Afiune Maya <[email protected]>
1 parent 0b1c4dc commit 3d3aff4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api/api.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@ const (
129129
apiRecommendations = "v2/recommendations/%s"
130130
)
131131

132+
// WithApiV2 configures the client to use the API version 2 (/api/v2)
133+
// for common API endpoints
134+
//
135+
// (no-op) DEPRECATED
136+
func WithApiV2() Option {
137+
return clientFunc(func(c *Client) error {
138+
c.log.Warn("WithApiV2() has been deprecated, all clients now default to APIv2")
139+
return nil
140+
})
141+
}
142+
132143
// ApiVersion returns the API client version
133144
func (c *Client) ApiVersion() string {
134145
return c.apiVersion

0 commit comments

Comments
 (0)