listFeedsPage method
Implementation
Future<FeedsPage> listFeedsPage(String projectId, {int pageSize = 100, String? continuationToken, String? filter, String? view}) async {
final encodedProjectId = Uri.encodeComponent(projectId);
final query = <String, String>{'page_size': '$pageSize'};
if (continuationToken != null) query['continuation_token'] = continuationToken;
if (filter != null && filter.trim().isNotEmpty) query['filter'] = filter;
if (view != null && view.trim().isNotEmpty) query['view'] = view;
final uri = Uri.parse('$baseUrl/accounts/projects/$encodedProjectId/feeds').replace(queryParameters: query);
final response = await httpClient.get(uri);
if (response.statusCode >= 400) {
throw MeshagentException(
'Failed to list feeds. '
'Status code: ${response.statusCode}, body: ${response.body}',
);
}
final data = jsonDecode(response.body) as Map<String, dynamic>;
return FeedsPage.fromJson(data);
}