getApiClient method

ApiClient getApiClient({
  1. String basePath = '/api/v2',
})

Implementation

ApiClient getApiClient({String basePath = '/api/v2'}) {
  var api = ApiClient(basePath: url! + basePath);
  if (token != null) {
    var authentication =
        api.getAuthentication('TokenAuthentication') as ApiKeyAuth;
    authentication.apiKeyPrefix = 'Token';
    authentication.apiKey = token;
  }
  api.client = client;
  api._defaultHeaderMap.addAll(defaultHeaders);
  return api;
}