-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IssuesEventsClient implementation and integration tests
- Loading branch information
Showing
8 changed files
with
159 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
#if NET_45 | ||
using System.Collections.Generic; | ||
#endif | ||
using System.Threading.Tasks; | ||
|
||
namespace Octokit | ||
{ | ||
public class IssuesEventsClient : ApiClient, IIssuesEventsClient | ||
{ | ||
public IssuesEventsClient(IApiConnection apiConnection) : base(apiConnection) | ||
{ | ||
} | ||
|
||
public Task<IReadOnlyList<EventInfo>> GetForIssue(string owner, string name, int number) | ||
{ | ||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); | ||
Ensure.ArgumentNotNullOrEmptyString(name, "name"); | ||
|
||
return ApiConnection.GetAll<EventInfo>(ApiUrls.IssuesEvents(owner, name, number)); | ||
} | ||
|
||
public Task<IReadOnlyList<IssueEvent>> GetForRepository(string owner, string name) | ||
{ | ||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); | ||
Ensure.ArgumentNotNullOrEmptyString(name, "name"); | ||
|
||
return ApiConnection.GetAll<IssueEvent>(ApiUrls.IssuesEvents(owner, name)); | ||
} | ||
|
||
public Task<IssueEvent> Get(string owner, string name, int number) | ||
{ | ||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); | ||
Ensure.ArgumentNotNullOrEmptyString(name, "name"); | ||
|
||
return ApiConnection.Get<IssueEvent>(ApiUrls.IssuesEvent(owner, name, number)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters