diff --git a/client/client.go b/client/client.go index 51e47db89..66c7d07f1 100644 --- a/client/client.go +++ b/client/client.go @@ -142,12 +142,12 @@ func (c *GorseClient) GetUserNeighbors(ctx context.Context, userId string, n, of return request[[]Score, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/user/%s/neighbors?n=%d&offset=%d", userId, n, offset), nil) } -func (c *GorseClient) GetItemNeighbors(ctx context.Context, itemId string, n, offset int) ([]Score, error) { - return request[[]Score, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/item/%s/neighbors?n=%d&offset=%d", itemId, n, offset), nil) +func (c *GorseClient) GetItemNeighbors(ctx context.Context, itemId, userId string, n, offset int) ([]Score, error) { + return request[[]Score, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/item/%s/neighbors?n=%d&offset=%d&user-id=%s", itemId, n, offset, userId), nil) } -func (c *GorseClient) GetItemNeighborsWithCategory(ctx context.Context, itemId, category string, n, offset int) ([]Score, error) { - return request[[]Score, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/item/%s/neighbors/%s?n=%d&offset=%d", itemId, category, n, offset), nil) +func (c *GorseClient) GetItemNeighborsWithCategory(ctx context.Context, itemId, category, userId string, n, offset int) ([]Score, error) { + return request[[]Score, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/item/%s/neighbors/%s?n=%d&offset=%d&user-id=%s", itemId, category, n, offset, userId), nil) } // Deprecated: GetItemNeighbors instead