diff --git a/lke_clusters.go b/lke_clusters.go index 96d799990..b1a386445 100644 --- a/lke_clusters.go +++ b/lke_clusters.go @@ -170,12 +170,6 @@ func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion return response, nil } -// LKEClusterAPIEndpointsPagedResponse represents a paginated LKEClusterAPIEndpoints API response -type LKEClusterAPIEndpointsPagedResponse struct { - *PageOptions - Data []LKEClusterAPIEndpoint `json:"data"` -} - // ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified func (c *Client) ListLKEClusterAPIEndpoints(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterAPIEndpoint, error) { response, err := getPaginatedResults[LKEClusterAPIEndpoint](ctx, c, formatAPIPath("lke/clusters/%d/api-endpoints", clusterID), opts) diff --git a/longview_subscriptions.go b/longview_subscriptions.go index d70c56ae2..586785bee 100644 --- a/longview_subscriptions.go +++ b/longview_subscriptions.go @@ -2,8 +2,6 @@ package linodego import ( "context" - - "github.com/go-resty/resty/v2" ) // LongviewSubscription represents a LongviewSubscription object @@ -16,27 +14,6 @@ type LongviewSubscription struct { // Updated *time.Time `json:"-"` } -// LongviewSubscriptionsPagedResponse represents a paginated LongviewSubscription API response -type LongviewSubscriptionsPagedResponse struct { - *PageOptions - Data []LongviewSubscription `json:"data"` -} - -// endpoint gets the endpoint URL for LongviewSubscription -func (LongviewSubscriptionsPagedResponse) endpoint(_ ...any) string { - return "longview/subscriptions" -} - -func (resp *LongviewSubscriptionsPagedResponse) castResult(r *resty.Request, e string) (int, int, error) { - res, err := coupleAPIErrors(r.SetResult(LongviewSubscriptionsPagedResponse{}).Get(e)) - if err != nil { - return 0, 0, err - } - castedRes := res.Result().(*LongviewSubscriptionsPagedResponse) - resp.Data = append(resp.Data, castedRes.Data...) - return castedRes.Pages, castedRes.Results, nil -} - // ListLongviewSubscriptions lists LongviewSubscriptions func (c *Client) ListLongviewSubscriptions(ctx context.Context, opts *ListOptions) ([]LongviewSubscription, error) { response, err := getPaginatedResults[LongviewSubscription](ctx, c, "longview/subscriptions", opts) diff --git a/paged_response_structs.go b/paged_response_structs.go index cee2a8d4e..806c0f354 100644 --- a/paged_response_structs.go +++ b/paged_response_structs.go @@ -39,9 +39,37 @@ type InvoiceItemsPagedResponse legacyPagedResponse[InvoiceItem] // Deprecated: InvoicesPagedResponse exists for historical compatibility and should not be used. type InvoicesPagedResponse legacyPagedResponse[Invoice] +// Deprecated: LKEClusterPoolsPagedResponse exists for historical compatibility and should not be used. +// LKEClusterPoolsPagedResponse represents a paginated LKEClusterPool API response. +type LKEClusterPoolsPagedResponse LKENodePoolsPagedResponse + +// Deprecated: LKEVersionsPagedResponse exists for historical compatibility and should not be used. +type LKEVersionsPagedResponse legacyPagedResponse[LKEVersion] + +// Deprecated: LKEClusterAPIEndpointsPagedResponse exists for historical compatibility and should not be used. +type LKEClusterAPIEndpointsPagedResponse legacyPagedResponse[LKEClusterAPIEndpoint] + +// Deprecated: LKEClustersPagedResponse exists for historical compatibility and should not be used. +type LKEClustersPagedResponse legacyPagedResponse[LKECluster] + +// Deprecated: LKENodePoolsPagedResponse exists for historical compatibility and should not be used. +type LKENodePoolsPagedResponse legacyPagedResponse[LKENodePool] + // Deprecated: LoginsPagedResponse exists for historical compatibility and should not be used. type LoginsPagedResponse legacyPagedResponse[Login] +// Deprecated: LongviewClientsPagedResponse exists for historical compatibility and should not be used. +type LongviewClientsPagedResponse legacyPagedResponse[LongviewClient] + +// Deprecated: LongviewSubscriptionsPagedResponse exists for historical compatibility and should not be used. +type LongviewSubscriptionsPagedResponse legacyPagedResponse[LongviewSubscription] + +// Deprecated: MySQLDatabasesPagedResponse exists for historical compatibility and should not be used. +type MySQLDatabasesPagedResponse legacyPagedResponse[MySQLDatabase] + +// Deprecated: MySQLDatabaseBackupsPagedResponse exists for historical compatibility and should not be used. +type MySQLDatabaseBackupsPagedResponse legacyPagedResponse[MySQLDatabaseBackup] + // Deprecated: NotificationsPagedResponse exists for historical compatibility and should not be used. type NotificationsPagedResponse legacyPagedResponse[Notification]