getOnlineUsersWithHttpInfo method

Future<Response> getOnlineUsersWithHttpInfo(
  1. String tenantId,
  2. String urlId, {
  3. String? afterName,
  4. String? afterUserId,
})

Currently-online viewers of a page: people whose websocket session is subscribed to the page right now. Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate).

Note: This method returns the HTTP Response.

Parameters:

  • String tenantId (required):

  • String urlId (required): Page URL identifier (cleaned server-side).

  • String afterName: Cursor: pass nextAfterName from the previous response.

  • String afterUserId: Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries.

Implementation

Future<Response> getOnlineUsersWithHttpInfo(String tenantId, String urlId, { String? afterName, String? afterUserId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/pages/{tenantId}/users/online'
    .replaceAll('{tenantId}', tenantId);

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'urlId', urlId));
  if (afterName != null) {
    queryParams.addAll(_queryParams('', 'afterName', afterName));
  }
  if (afterUserId != null) {
    queryParams.addAll(_queryParams('', 'afterUserId', afterUserId));
  }

  const contentTypes = <String>[];


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