getViews method

Future<Map<String, dynamic>> getViews({
  1. required String contentId,
  2. String? fromDate,
})

Get the total number of views a piece of content has.

Implementation

Future<Map<String, dynamic>> getViews(
    {required String contentId, String? fromDate}) async {
  return await _client.send(
    'get',
    'wiki/rest/api/analytics/content/{contentId}/views',
    pathParameters: {
      'contentId': contentId,
    },
    queryParameters: {
      if (fromDate != null) 'fromDate': fromDate,
    },
  ) as Map<String, Object?>;
}