(operatorConfig OperatorConfig, apiName string)
| 52 | } |
| 53 | |
| 54 | func DescribeAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) { |
| 55 | httpRes, err := HTTPGet(operatorConfig, "/describe/"+apiName) |
| 56 | if err != nil { |
| 57 | return nil, err |
| 58 | } |
| 59 | |
| 60 | var apiRes []schema.APIResponse |
| 61 | if err = json.Unmarshal(httpRes, &apiRes); err != nil { |
| 62 | return nil, errors.Wrap(err, "/describe/"+apiName, string(httpRes)) |
| 63 | } |
| 64 | |
| 65 | return apiRes, nil |
| 66 | } |
| 67 | |
| 68 | func GetAPIByID(operatorConfig OperatorConfig, apiName string, apiID string) ([]schema.APIResponse, error) { |
| 69 | httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName+"/"+apiID) |
no test coverage detected