getVotesForUserWithHttpInfo method

Future<Response> getVotesForUserWithHttpInfo(
  1. String tenantId,
  2. String urlId, [
  3. GetVotesForUserOptions? options
])

Performs an HTTP 'GET /api/v1/votes/for-user' operation and returns the Response. Parameters:

Implementation

Future<Response> getVotesForUserWithHttpInfo(String tenantId, String urlId, [ GetVotesForUserOptions? options ]) async {
  final userId = options?.userId;
  final anonUserId = options?.anonUserId;
  // ignore: prefer_const_declarations
  final path = r'/api/v1/votes/for-user';

  // 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('', 'urlId', urlId));
  if (userId != null) {
    queryParams.addAll(_queryParams('', 'userId', userId));
  }
  if (anonUserId != null) {
    queryParams.addAll(_queryParams('', 'anonUserId', anonUserId));
  }

  const contentTypes = <String>[];


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