API Reference
GitHubDashboardService
Native GitHub dashboard service for shared observability scenarios.
Inheritance
- Object
- GitHubDashboardService
Constructors
public GitHubDashboardService(String token, String? apiBaseUrl = null) #Initializes a dashboard service with a GitHub token.
Parameters
- token System.String
- apiBaseUrl System.String? = null
Methods
public static GitHubProfileInfo CreateProfileInfo(JsonElement user, String? fallbackLogin = null) #GitHubProfileInfoCreates profile details from a GitHub REST user payload.
Parameters
- user System.Text.Json.JsonElement
- fallbackLogin System.String? = null
public Void Dispose() #VoidPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public async Task<GitHubDashboardData> FetchAsync(String? login = null, CancellationToken cancellationToken = default) #Task<GitHubDashboardData>Creates a dashboard snapshot for the authenticated user or an explicitly supplied login.
Parameters
- login System.String? = null
- Optional user login override. When omitted, the authenticated user is used.
- cancellationToken System.Threading.CancellationToken = default
- Optional cancellation token.
Returns
GitHub dashboard data.
public async Task<GitHubRepoInfo?> FetchRepositoryAsync(String repositoryNameWithOwner, CancellationToken cancellationToken = default) #Task<GitHubRepoInfo?>Fetches a single public repository by owner/name.
Parameters
- repositoryNameWithOwner System.String
- cancellationToken System.Threading.CancellationToken = default
public async Task<IReadOnlyList<GitHubRepositoryStargazerInfo>> FetchStargazersAsync(String repositoryNameWithOwner, Int32 limit = 200, CancellationToken cancellationToken = default) #Task<IReadOnlyList<GitHubRepositoryStargazerInfo>>Fetches recent stargazers for a repository using the public REST API.
Parameters
- repositoryNameWithOwner System.String
- limit System.Int32 = 200
- cancellationToken System.Threading.CancellationToken = default
public async Task<IReadOnlyList<GitHubRepositoryForkInfo>> FetchUsefulForksAsync(String repositoryNameWithOwner, Int32 limit = 20, CancellationToken cancellationToken = default) #Task<IReadOnlyList<GitHubRepositoryForkInfo>>Fetches and ranks potentially useful forks for a repository.
Parameters
- repositoryNameWithOwner System.String
- limit System.Int32 = 20
- cancellationToken System.Threading.CancellationToken = default
public async Task<String?> GetAuthenticatedLoginAsync(CancellationToken cancellationToken = default) #Task<String?>Resolves the authenticated GitHub login from the API.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public static async Task<String?> ResolveTokenAsync(CancellationToken cancellationToken = default) #Task<String?>Returns a GitHub token from common environment variables or the local GitHub CLI login when available.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public static String? ResolveTokenFromEnvironment() #String?Returns a GitHub token from common environment variables when available.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?