Module: DiscourseApi::API::Dashboard
- Included in:
- Client
- Defined in:
- lib/discourse_api/api/dashboard.rb
Instance Method Summary collapse
Instance Method Details
#get_dashboard_stats ⇒ Object
5 6 7 8 |
# File 'lib/discourse_api/api/dashboard.rb', line 5 def get_dashboard_stats response = get("admin/dashboard.json") response[:body] end |
#get_dashboard_stats_totals ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/discourse_api/api/dashboard.rb', line 10 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 |