getDatasourceEntries method

Future<List<DatasourceEntry>> getDatasourceEntries({
  1. required String datasource,
  2. String? dimension,
  3. Pagination? pagination,
})

Implementation

Future<List<DatasourceEntry>> getDatasourceEntries({
  required String datasource,
  String? dimension,
  Pagination? pagination,
}) async {
  final json = await _getRequest(
    path: _pathDatasourceEntries,
    queryParameters: {
      "datasource": datasource,
      if (dimension != null) "dimension": dimension,
      if (pagination != null) ...pagination.toParameters(),
    },
  );
  return List<JSONMap>.from(json["datasource_entries"]).map(DatasourceEntry.fromJson).toList();
}