createVoteWithHttpInfo method
Performs an HTTP 'POST /api/v1/votes' operation and returns the Response.
Parameters:
Implementation
Future<Response> createVoteWithHttpInfo(String tenantId, String commentId, String direction, { String? userId, String? anonUserId, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/votes';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'tenantId', tenantId));
queryParams.addAll(_queryParams('', 'commentId', commentId));
queryParams.addAll(_queryParams('', 'direction', direction));
if (userId != null) {
queryParams.addAll(_queryParams('', 'userId', userId));
}
if (anonUserId != null) {
queryParams.addAll(_queryParams('', 'anonUserId', anonUserId));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}