getEmailTextLinesWithHttpInfo method

Future<Response> getEmailTextLinesWithHttpInfo(
  1. String emailId, {
  2. bool? decodeHtmlEntities,
  3. String? lineSeparator,
})

Parse and return text from an email, stripping HTML and decoding encoded characters

Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.

Note: This method returns the HTTP Response.

Parameters:

  • String emailId (required): ID of email to fetch text for

  • bool decodeHtmlEntities: Decode HTML entities

  • String lineSeparator: Line separator character

Implementation

Future<Response> getEmailTextLinesWithHttpInfo(String emailId, { bool? decodeHtmlEntities, String? lineSeparator, }) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/{emailId}/textLines'
    .replaceAll('{emailId}', emailId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (decodeHtmlEntities != null) {
    queryParams.addAll(_queryParams('', 'decodeHtmlEntities', decodeHtmlEntities));
  }
  if (lineSeparator != null) {
    queryParams.addAll(_queryParams('', 'lineSeparator', lineSeparator));
  }

  const contentTypes = <String>[];


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