Sha256: 9a446b5ed3d9274c8ea564e1dc9ed1e03f0d2134fc280ada0c6226c33c8b4b05
Contents?: true
Size: 591 Bytes
Versions: 18
Compression:
Stored size: 591 Bytes
Contents
# frozen_string_literal: true module DiscourseApi module API module Dashboard def get_dashboard_stats response = get("admin/dashboard.json") response[:body] end def get_dashboard_stats_totals stats = get_dashboard_stats global_reports = stats['global_reports'] users = global_reports[1] topics = global_reports[3] posts = global_reports[4] totals = { 'users' => users['total'], 'topics' => topics['total'], 'posts' => posts['total'] } end end end end
Version data entries
18 entries across 18 versions & 1 rubygems