getTranslationsWithHttpInfo method

Future<Response> getTranslationsWithHttpInfo(
  1. String namespace,
  2. String component, [
  3. GetTranslationsOptions? options
])

Performs an HTTP 'GET /translations/{namespace}/{component}' operation and returns the Response. Parameters:

Implementation

Future<Response> getTranslationsWithHttpInfo(String namespace, String component, [ GetTranslationsOptions? options ]) async {
  final locale = options?.locale;
  final useFullTranslationIds = options?.useFullTranslationIds;
  // ignore: prefer_const_declarations
  final path = r'/translations/{namespace}/{component}'
    .replaceAll('{namespace}', namespace)
    .replaceAll('{component}', component);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (locale != null) {
    queryParams.addAll(_queryParams('', 'locale', locale));
  }
  if (useFullTranslationIds != null) {
    queryParams.addAll(_queryParams('', 'useFullTranslationIds', useFullTranslationIds));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}