getChannelsInboxWithHttpInfo method

Future<Response> getChannelsInboxWithHttpInfo({
  1. String? since,
  2. String? limit,
})

Returns the messages people have sent to the caller org's connected chat bots, oldest first, in the portable envelope shape every transport normalises into.

Returns the messages people have sent to the caller org's connected chat bots, oldest first, in the portable envelope shape every transport normalises into. It is a CURSOR feed, not a search: pass the returned cursor back as since to get only what has arrived since. Only this org's messages are stored under this org, so the feed can never carry another tenant's chat.

Note: This method returns the HTTP Response.

Parameters:

  • String since: Since is the exclusive cursor: only messages with a higher row id come back. Empty starts at the beginning. Must parse as an integer.

  • String limit: Limit caps how many messages come back. Empty or 0 uses the store's default page size. Must parse as an integer.

Implementation

Future<Response> getChannelsInboxWithHttpInfo({ String? since, String? limit, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/channels/inbox';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (since != null) {
    queryParams.addAll(_queryParams('', 'since', since));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }

  const contentTypes = <String>[];


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