createFeedPostWithHttpInfo method

Future<Response> createFeedPostWithHttpInfo(
  1. String tenantId,
  2. CreateFeedPostParams createFeedPostParams, [
  3. CreateFeedPostOptions? options
])

Performs an HTTP 'POST /api/v1/feed-posts' operation and returns the Response. Parameters:

Implementation

Future<Response> createFeedPostWithHttpInfo(String tenantId, CreateFeedPostParams createFeedPostParams, [ CreateFeedPostOptions? options ]) async {
  final broadcastId = options?.broadcastId;
  final isLive = options?.isLive;
  final doSpamCheck = options?.doSpamCheck;
  final skipDupCheck = options?.skipDupCheck;
  // ignore: prefer_const_declarations
  final path = r'/api/v1/feed-posts';

  // ignore: prefer_final_locals
  Object? postBody = createFeedPostParams;

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

    queryParams.addAll(_queryParams('', 'tenantId', tenantId));
  if (broadcastId != null) {
    queryParams.addAll(_queryParams('', 'broadcastId', broadcastId));
  }
  if (isLive != null) {
    queryParams.addAll(_queryParams('', 'isLive', isLive));
  }
  if (doSpamCheck != null) {
    queryParams.addAll(_queryParams('', 'doSpamCheck', doSpamCheck));
  }
  if (skipDupCheck != null) {
    queryParams.addAll(_queryParams('', 'skipDupCheck', skipDupCheck));
  }

  const contentTypes = <String>['application/json'];


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