factsByRecordKey method

Future<IFacts> factsByRecordKey({
  1. String? recordKey,
})
override

Implementation

Future<IFacts> factsByRecordKey({String? recordKey}) async {
  final builder = RequestBuilder();
  builder.body = null;
  // create path and map variables
  // create path and map variables
  builder.path = "/sunny/0.0.1/fact/factsByRecordKey";
  builder.queryParams["recordKey"] = recordKey;
  List<String> contentTypes = [];
  String contentType =
      contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
  builder.contentType = contentType;
  builder.basePath = apiClient.basePaths["facts"];
  builder.method = HttpMethod.GET;

  final response = await apiClient.invokeRequest(builder);
  final value = json.decode(response.body);
  return IFacts.fromJson(value);
}