getEmailHTMLQueryWithHttpInfo method
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 text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
Note: This method returns the HTTP Response
.
Parameters:
-
String emailId (required): ID of email to perform HTML query on
-
String htmlSelector (required): HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
Implementation
Future<Response> getEmailHTMLQueryWithHttpInfo(String emailId, String htmlSelector,) async {
// ignore: prefer_const_declarations
final path = r'/emails/{emailId}/htmlQuery'
.replaceAll('{emailId}', emailId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'htmlSelector', htmlSelector));
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}