Sha256: f858a2104a27dfb5ebc295bccece9ec9eb61b4528172294bf295a13a30fa6e08
Contents?: true
Size: 587 Bytes
Versions: 33
Compression:
Stored size: 587 Bytes
Contents
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
33 entries across 33 versions & 1 rubygems