public Task <GitHubResponse <Account> > User(string login, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.User(login, cache, priority), cacheOptions )); }
public Task <GitHubResponse <Issue> > Issue(string repoFullName, int number, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.Issue(repoFullName, number, cache, priority), cacheOptions )); }
public Task <GitHubResponse <Issue> > Issue(string repoFullName, int number, GitHubCacheDetails cacheOptions, RequestPriority priority) { var request = new GitHubRequest($"repos/{repoFullName}/issues/{number}", cacheOptions, priority) { // https://developer.github.com/v3/issues/#reactions-summary AcceptHeaderOverride = "application/vnd.github.squirrel-girl-preview+json" }; return(EnqueueRequest <Issue>(request)); }
public Task <GitHubResponse <IDictionary <string, JToken> > > BranchProtection(string repoFullName, string branchName, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.BranchProtection(repoFullName, branchName, cache, priority), cacheOptions )); }
public Task <GitHubResponse <IEnumerable <CommitStatus> > > CommitStatuses(string repoFullName, string reference, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.CommitStatuses(repoFullName, reference, cache, priority), cacheOptions )); }
public Task <GitHubResponse <Commit> > Commit(string repoFullName, string hash, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.Commit(repoFullName, hash, cache, priority), cacheOptions )); }
public Task <GitHubResponse <IEnumerable <IssueComment> > > IssueComments(string repoFullName, int issueNumber, DateTimeOffset?since, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.IssueComments(repoFullName, issueNumber, since, cache, priority), cacheOptions )); }
public Task <GitHubResponse <IssueComment> > IssueComment(string repoFullName, long commentId, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.IssueComment(repoFullName, commentId, cache, priority), cacheOptions )); }
public Task <GitHubResponse <IEnumerable <Account> > > Assignable(string repoFullName, uint hardPageLimit, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(TryWithFallback( (actor, cache) => actor.Assignable(repoFullName, hardPageLimit, cache, priority), cacheOptions )); }
public Task <GitHubResponse <IEnumerable <Project> > > OrganizationProjects(string organizationLogin, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(Projects($"orgs/{organizationLogin}/projects", cacheOptions, priority)); }
public Task <GitHubResponse <IEnumerable <Project> > > RepositoryProjects(string repoFullName, GitHubCacheDetails cacheOptions, RequestPriority priority) { return(Projects($"repos/{repoFullName}/projects", cacheOptions, priority)); }
private Task <GitHubResponse <IEnumerable <Project> > > Projects(string endpoint, GitHubCacheDetails cacheOptions, RequestPriority priority) { var request = new GitHubRequest(endpoint, cacheOptions, priority) { AcceptHeaderOverride = "application/vnd.github.inertia-preview.iso8601+json", }; return(FetchPaged(request, (Project p) => p.Id)); }
public Task <GitHubResponse <byte[]> > FileContents(string repoFullName, string filePath, GitHubCacheDetails cacheOptions, RequestPriority priority) { if (!filePath.StartsWith("/", StringComparison.Ordinal)) { filePath = "/" + filePath; } var request = new GitHubRequest($"repos/{repoFullName}/contents{filePath}", cacheOptions, priority); return(EnqueueRequest <byte[]>(request)); }
public Task <GitHubResponse <IEnumerable <ContentsFile> > > ListDirectoryContents(string repoFullName, string directoryPath, GitHubCacheDetails cacheOptions, RequestPriority priority) { if (!directoryPath.StartsWith("/", StringComparison.Ordinal)) { directoryPath = "/" + directoryPath; } var request = new GitHubRequest($"repos/{repoFullName}/contents{directoryPath}", cacheOptions, priority); return(FetchPaged(request, (ContentsFile f) => f.Path)); }
public Task <GitHubResponse <IEnumerable <Webhook> > > RepositoryWebhooks(string repoFullName, GitHubCacheDetails cacheOptions, RequestPriority priority) { var request = new GitHubRequest($"repos/{repoFullName}/hooks", cacheOptions, priority); return(FetchPaged(request, (Webhook x) => x.Id)); }