tgstation-server 5.12.7
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IGitHubService.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Threading;
4using System.Threading.Tasks;
5
6using Octokit;
7
9
11{
15 public interface IGitHubService
16 {
22 Task<Uri> GetUpdatesRepositoryUrl(CancellationToken cancellationToken);
23
30 Task<Dictionary<Version, Release>> GetTgsReleases(CancellationToken cancellationToken);
31
39 Task<string> CreateOAuthAccessToken(OAuthConfiguration oAuthConfiguration, string code, CancellationToken cancellationToken);
40
48 Task<long> GetRepositoryId(string repoOwner, string repoName, CancellationToken cancellationToken);
49
55 Task<int> GetCurrentUserId(CancellationToken cancellationToken);
56
65 Task<PullRequest> GetPullRequest(string repoOwner, string repoName, int pullRequestNumber, CancellationToken cancellationToken);
66 }
67}
Service for interacting with the GitHub API.
Task< long > GetRepositoryId(string repoOwner, string repoName, CancellationToken cancellationToken)
Get a target repostiory's ID.
Task< int > GetCurrentUserId(CancellationToken cancellationToken)
Get the current user's ID.
Task< string > CreateOAuthAccessToken(OAuthConfiguration oAuthConfiguration, string code, CancellationToken cancellationToken)
Attempt to get an OAuth token from a given code .
Task< PullRequest > GetPullRequest(string repoOwner, string repoName, int pullRequestNumber, CancellationToken cancellationToken)
Get a given pullRequestNumber .
Task< Dictionary< Version, Release > > GetTgsReleases(CancellationToken cancellationToken)
Get all valid TGS Releases from the configured update source.
Task< Uri > GetUpdatesRepositoryUrl(CancellationToken cancellationToken)
Gets the Uri of the repository designated as the updates repository.