mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 12:26:18 +00:00
36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Enterprise Admin Stats API
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/enterprise/admin_stats/">Enterprise Admin Stats API documentation</a> for more information.
|
|
///</remarks>
|
|
public class EnterpriseAdminStatsClient : ApiClient, IEnterpriseAdminStatsClient
|
|
{
|
|
public EnterpriseAdminStatsClient(IApiConnection apiConnection)
|
|
: base(apiConnection)
|
|
{ }
|
|
|
|
/// <summary>
|
|
/// Gets GitHub Enterprise statistics (must be Site Admin user).
|
|
/// </summary>
|
|
/// <remarks>
|
|
///https://developer.github.com/v3/enterprise/admin_stats/#get-statistics
|
|
/// </remarks>
|
|
/// <returns>The <see cref="AdminStats"/> collection for the requested <see cref="AdminStatsType"/> type.</returns>
|
|
[SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase")]
|
|
public Task<AdminStats> GetStatistics(AdminStatsType type)
|
|
{
|
|
return ApiConnection.Get<AdminStats>(ApiUrls.EnterpriseAdminStats(type.ToString().ToLowerInvariant()));
|
|
}
|
|
}
|
|
}
|