123456789_123456789_123456789_123456789_123456789_

Module: Octokit::EnterpriseAdminClient::AdminStats

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/enterprise_admin_client/admin_stats.rb

Overview

Methods for the Enterprise Admin Stats API

Instance Method Summary

Instance Method Details

#admin_comments_statsSawyer::Resource

Get only comment-related stats

Examples:

Get only comment-related stats

@client.admin_comments_stats

Returns:

  • (Sawyer::Resource)

    Only comment-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 104

def admin_comments_stats
  get_admin_stats 'comments'
end

#admin_gists_statsSawyer::Resource

Get only gist-related stats

Examples:

Get only gist-related stats

@client.admin_gits_stats

Returns:

  • (Sawyer::Resource)

    Only only gist-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 95

def admin_gists_stats
  get_admin_stats 'gists'
end

#admin_hooks_statsSawyer::Resource

Get only hooks-related stats

Examples:

Get only hooks-related stats

@client.admin_hooks_stats

Returns:

  • (Sawyer::Resource)

    Only hooks-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 32

def admin_hooks_stats
  get_admin_stats 'hooks'
end

#admin_issues_statsSawyer::Resource

Get only issue-related stats

Examples:

Get only issue-related stats

@client.admin_issues_stats

Returns:

  • (Sawyer::Resource)

    Only issue-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 77

def admin_issues_stats
  get_admin_stats 'issues'
end

#admin_milestones_statsSawyer::Resource

Get only milestone-related stats

Examples:

Get only milestone-related stats

@client.admin_milestones_stats

Returns:

  • (Sawyer::Resource)

    Only milestone-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 86

def admin_milestones_stats
  get_admin_stats 'milestones'
end

#admin_organization_statsSawyer::Resource

Get only organization-related stats

Examples:

Get only organization-related stats

@client.admin_organization_stats

Returns:

  • (Sawyer::Resource)

    Only organization-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 50

def admin_organization_stats
  get_admin_stats 'orgs'
end

#admin_pages_statsSawyer::Resource

Get only pages-related stats

Examples:

Get only pages-related stats

@client.admin_pages_stats

Returns:

  • (Sawyer::Resource)

    Only pages-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 41

def admin_pages_stats
  get_admin_stats 'pages'
end

#admin_pull_requests_statsSawyer::Resource

Get only pull request-related stats

Examples:

Get only pull request-related stats

@client.admin_pull_requests_stats

Returns:

  • (Sawyer::Resource)

    Only pull request-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 68

def admin_pull_requests_stats
  get_admin_stats 'pulls'
end

#admin_repository_statsSawyer::Resource

Get only repository-related stats

Examples:

Get only repository-related stats

@client.admin_repository_stats

Returns:

  • (Sawyer::Resource)

    Only repository-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 23

def admin_repository_stats
  get_admin_stats 'repos'
end

#admin_statsSawyer::Resource

Get all available stats

Examples:

Get all available stats

@client.admin_stats

Returns:

  • (Sawyer::Resource)

    All available stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 14

def admin_stats
  get_admin_stats 'all'
end

#admin_users_statsSawyer::Resource

Get only user-related stats

Examples:

Get only user-related stats

@client.admin_users_stats

Returns:

  • (Sawyer::Resource)

    Only user-related stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 59

def admin_users_stats
  get_admin_stats 'users'
end

#get_admin_stats(metric) ⇒ Sawyer::Resource (private)

This method is for internal use only.

Parameters:

  • metric (String)

    The metrics you are looking for

Returns:

  • (Sawyer::Resource)

    Magical unicorn stats

[ GitHub ]

  
# File 'lib/octokit/enterprise_admin_client/admin_stats.rb', line 114

def get_admin_stats(metric)
  get "enterprise/stats/#{metric}"
end