getWrappedKeyList fetches a wrapped list from the API.
(path, key string)
| 312 | |
| 313 | // getWrappedKeyList fetches a wrapped list from the API. |
| 314 | func (c *Client) getWrappedKeyList(path, key string) ([]map[string]any, error) { |
| 315 | wrapper, err := c.getJSON(path) |
| 316 | if err != nil { |
| 317 | return nil, err |
| 318 | } |
| 319 | return extractList(wrapper, key) |
| 320 | } |
| 321 | |
| 322 | // extractList pulls an array of maps from a wrapper object by key. |
| 323 | func extractList(wrapper map[string]any, key string) ([]map[string]any, error) { |
no test coverage detected