public async Task <IEnumerable <FileDiff> > GetPullRequestDiff(string repositoryName, string owner, long id) { var url = ApiUrls.PullRequestDiff(owner, repositoryName, id); var request = new BitbucketRestRequest(url, Method.GET); var response = await RestClient.ExecuteTaskAsync(request); return(DiffFileParser.Parse(response.Content)); }
public async Task <IEnumerable <FileDiff> > GetCommitsDiff(string repoName, string owner, string fromCommit, string toCommit) { if (fromCommit == toCommit) //otherwise it produces diff against its parent { return(Enumerable.Empty <FileDiff>()); } var url = ApiUrls.CommitsDiff(owner, repoName, fromCommit, toCommit); var request = new BitbucketRestRequest(url, Method.GET); var response = await RestClient.ExecuteTaskAsync(request); return(DiffFileParser.Parse(response.Content)); }