FetchPricing retrieves the public pricing data from the API.
()
| 335 | |
| 336 | // FetchPricing retrieves the public pricing data from the API. |
| 337 | func (c *Client) FetchPricing() (map[string]float64, error) { |
| 338 | var result struct { |
| 339 | Pricing map[string]float64 `json:"pricing"` |
| 340 | } |
| 341 | if err := c.doRequest(context.Background(), "GET", "/v2/pricing", nil, &result); err != nil { |
| 342 | return nil, err |
| 343 | } |
| 344 | return result.Pricing, nil |
| 345 | } |
| 346 | |
| 347 | // GetSpecs retrieves GPU spec configurations from the API. |
| 348 | func (c *Client) GetSpecs() (map[string]GpuSpecConfig, error) { |
no test coverage detected