getPagesPublicWithHttpInfo method
List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires enableFChat to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access.
Note: This method returns the HTTP Response.
Parameters:
-
String tenantId (required):
-
String cursor: Opaque pagination cursor returned as
nextCursorfrom a prior request. Tied to the samesortBy. -
int limit: 1..200, default 50
-
String q: Optional case-insensitive title prefix filter.
-
PagesSortBy sortBy: Sort order.
updatedAt(default, newest first),commentCount(most comments first), ortitle(alphabetical). -
bool hasComments: If true, only return pages with at least one comment.
Implementation
Future<Response> getPagesPublicWithHttpInfo(String tenantId, [ GetPagesPublicOptions? options ]) async {
final cursor = options?.cursor;
final limit = options?.limit;
final q = options?.q;
final sortBy = options?.sortBy;
final hasComments = options?.hasComments;
// ignore: prefer_const_declarations
final path = r'/pages/{tenantId}'
.replaceAll('{tenantId}', tenantId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (cursor != null) {
queryParams.addAll(_queryParams('', 'cursor', cursor));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
if (q != null) {
queryParams.addAll(_queryParams('', 'q', q));
}
if (sortBy != null) {
queryParams.addAll(_queryParams('', 'sortBy', sortBy));
}
if (hasComments != null) {
queryParams.addAll(_queryParams('', 'hasComments', hasComments));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}