diff --git a/Octokit/Clients/IUserKeysClient.cs b/Octokit/Clients/IUserKeysClient.cs new file mode 100644 index 00000000..4c369862 --- /dev/null +++ b/Octokit/Clients/IUserKeysClient.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Octokit +{ + public interface IUserKeysClient + { + Task> GetAll(); + Task> GetAll(string userName); + } +} diff --git a/Octokit/Clients/IUsersClient.cs b/Octokit/Clients/IUsersClient.cs index 607e849b..1e2cefe5 100644 --- a/Octokit/Clients/IUsersClient.cs +++ b/Octokit/Clients/IUsersClient.cs @@ -19,6 +19,14 @@ namespace Octokit /// IUserEmailsClient Email { get; } + /// + /// A client for GitHub's User Keys API + /// + /// + /// See the Keys API documentation for more information. + /// + IUserKeysClient Keys { get; } + /// /// Returns the user specified by the login. /// diff --git a/Octokit/Clients/UserKeysClient.cs b/Octokit/Clients/UserKeysClient.cs new file mode 100644 index 00000000..da6cc736 --- /dev/null +++ b/Octokit/Clients/UserKeysClient.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Octokit +{ + public class UserKeysClient : ApiClient, IUserKeysClient + { + public UserKeysClient(IApiConnection apiConnection) + : base(apiConnection) + { + } + + public Task> GetAll() + { + return null; + } + + public Task> GetAll(string userName) + { + return null; + } + } +} \ No newline at end of file diff --git a/Octokit/Clients/UsersClient.cs b/Octokit/Clients/UsersClient.cs index 54e185d3..03429382 100644 --- a/Octokit/Clients/UsersClient.cs +++ b/Octokit/Clients/UsersClient.cs @@ -21,6 +21,7 @@ namespace Octokit { Email = new UserEmailsClient(apiConnection); Followers = new FollowersClient(apiConnection); + Keys = new UserKeysClient(apiConnection); } /// @@ -31,6 +32,14 @@ namespace Octokit /// public IUserEmailsClient Email { get; private set; } + /// + /// A client for GitHub's User Keys API + /// + /// + /// See the Keys API documentation for more information. + /// + public IUserKeysClient Keys { get; private set; } + /// /// Returns the user specified by the login. /// diff --git a/Octokit/Models/Request/PublicKey.cs b/Octokit/Models/Request/PublicKey.cs new file mode 100644 index 00000000..1e5c23bd --- /dev/null +++ b/Octokit/Models/Request/PublicKey.cs @@ -0,0 +1,8 @@ +namespace Octokit +{ + public class PublicKey + { + public int Id { get; set; } + public string Key { get; set; } + } +} diff --git a/Octokit/Octokit-Mono.csproj b/Octokit/Octokit-Mono.csproj index a5905eb4..82ac725a 100644 --- a/Octokit/Octokit-Mono.csproj +++ b/Octokit/Octokit-Mono.csproj @@ -324,6 +324,9 @@ + + + \ No newline at end of file diff --git a/Octokit/Octokit-MonoAndroid.csproj b/Octokit/Octokit-MonoAndroid.csproj index 42e54c8e..ff10f3b6 100644 --- a/Octokit/Octokit-MonoAndroid.csproj +++ b/Octokit/Octokit-MonoAndroid.csproj @@ -334,6 +334,9 @@ + + + \ No newline at end of file diff --git a/Octokit/Octokit-Monotouch.csproj b/Octokit/Octokit-Monotouch.csproj index b7086e9a..578182e0 100644 --- a/Octokit/Octokit-Monotouch.csproj +++ b/Octokit/Octokit-Monotouch.csproj @@ -329,6 +329,9 @@ + + + \ No newline at end of file diff --git a/Octokit/Octokit-Portable.csproj b/Octokit/Octokit-Portable.csproj index 1f9ecd6d..09eec189 100644 --- a/Octokit/Octokit-Portable.csproj +++ b/Octokit/Octokit-Portable.csproj @@ -321,6 +321,9 @@ + + + diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index d2344d30..1aa16020 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -325,6 +325,9 @@ + + + diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 076c15bb..b01b97a6 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -57,6 +57,7 @@ + @@ -64,6 +65,7 @@ + @@ -71,6 +73,7 @@ +