saveCommentWithHttpInfo method
Future<Response>
saveCommentWithHttpInfo(
- String tenantId,
- CreateCommentParams createCommentParams, [
- SaveCommentOptions? options
Performs an HTTP 'POST /api/v1/comments' operation and returns the Response.
Parameters:
Implementation
Future<Response> saveCommentWithHttpInfo(String tenantId, CreateCommentParams createCommentParams, [ SaveCommentOptions? options ]) async {
final isLive = options?.isLive;
final doSpamCheck = options?.doSpamCheck;
final sendEmails = options?.sendEmails;
final populateNotifications = options?.populateNotifications;
// ignore: prefer_const_declarations
final path = r'/api/v1/comments';
// ignore: prefer_final_locals
Object? postBody = createCommentParams;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'tenantId', tenantId));
if (isLive != null) {
queryParams.addAll(_queryParams('', 'isLive', isLive));
}
if (doSpamCheck != null) {
queryParams.addAll(_queryParams('', 'doSpamCheck', doSpamCheck));
}
if (sendEmails != null) {
queryParams.addAll(_queryParams('', 'sendEmails', sendEmails));
}
if (populateNotifications != null) {
queryParams.addAll(_queryParams('', 'populateNotifications', populateNotifications));
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}