getRoute method

Future<GetRouteResult> getRoute({
  1. required String apiId,
  2. required String routeId,
})

Gets a Route.

May throw NotFoundException. May throw TooManyRequestsException.

Parameter apiId : The API identifier.

Parameter routeId : The route ID.

Implementation

Future<GetRouteResult> getRoute({
  required String apiId,
  required String routeId,
}) async {
  ArgumentError.checkNotNull(apiId, 'apiId');
  ArgumentError.checkNotNull(routeId, 'routeId');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/apis/${Uri.encodeComponent(apiId)}/routes/${Uri.encodeComponent(routeId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetRouteResult.fromJson(response);
}