stubbed the client and a couple of methods

This commit is contained in:
Brendan Forster
2014-07-08 11:08:37 +09:30
parent d5b6d45562
commit 5a24bbb9f8
11 changed files with 77 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Octokit
{
public interface IUserKeysClient
{
Task<IReadOnlyList<PublicKey>> GetAll();
Task<IReadOnlyList<PublicKey>> GetAll(string userName);
}
}
+8
View File
@@ -19,6 +19,14 @@ namespace Octokit
///</remarks>
IUserEmailsClient Email { get; }
/// <summary>
/// A client for GitHub's User Keys API
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/keys/">Keys API documentation</a> for more information.
///</remarks>
IUserKeysClient Keys { get; }
/// <summary>
/// Returns the user specified by the login.
/// </summary>
+23
View File
@@ -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<IReadOnlyList<PublicKey>> GetAll()
{
return null;
}
public Task<IReadOnlyList<PublicKey>> GetAll(string userName)
{
return null;
}
}
}
+9
View File
@@ -21,6 +21,7 @@ namespace Octokit
{
Email = new UserEmailsClient(apiConnection);
Followers = new FollowersClient(apiConnection);
Keys = new UserKeysClient(apiConnection);
}
/// <summary>
@@ -31,6 +32,14 @@ namespace Octokit
///</remarks>
public IUserEmailsClient Email { get; private set; }
/// <summary>
/// A client for GitHub's User Keys API
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/keys/">Keys API documentation</a> for more information.
///</remarks>
public IUserKeysClient Keys { get; private set; }
/// <summary>
/// Returns the user specified by the login.
/// </summary>
+8
View File
@@ -0,0 +1,8 @@
namespace Octokit
{
public class PublicKey
{
public int Id { get; set; }
public string Key { get; set; }
}
}
+3
View File
@@ -324,6 +324,9 @@
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
+3
View File
@@ -334,6 +334,9 @@
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
</Project>
+3
View File
@@ -329,6 +329,9 @@
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
+3
View File
@@ -321,6 +321,9 @@
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
+3
View File
@@ -325,6 +325,9 @@
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
+3
View File
@@ -57,6 +57,7 @@
<Compile Include="Clients\IOAuthClient.cs" />
<Compile Include="Clients\IRepositoryCommitsClient.cs" />
<Compile Include="Clients\IRepositoryDeployKeysClient.cs" />
<Compile Include="Clients\IUserKeysClient.cs" />
<Compile Include="Clients\OAuthClient.cs" />
<Compile Include="Clients\RepositoryCommentsClient.cs" />
<Compile Include="Clients\IRepositoryCommentsClient.cs" />
@@ -64,6 +65,7 @@
<Compile Include="Clients\IFeedsClient.cs" />
<Compile Include="Clients\RepositoryCommitsClient.cs" />
<Compile Include="Clients\RepositoryDeployKeysClient.cs" />
<Compile Include="Clients\UserKeysClient.cs" />
<Compile Include="Exceptions\PrivateRepositoryQuotaExceededException.cs" />
<Compile Include="Exceptions\RepositoryExistsException.cs" />
<Compile Include="Helpers\ApiErrorExtensions.cs" />
@@ -71,6 +73,7 @@
<Compile Include="Helpers\HttpClientExtensions.cs" />
<Compile Include="Http\ProductHeaderValue.cs" />
<Compile Include="Models\Request\NewDeployKey.cs" />
<Compile Include="Models\Request\PublicKey.cs" />
<Compile Include="Models\Response\DeployKey.cs" />
<Compile Include="Models\Request\OauthLoginRequest.cs" />
<Compile Include="Models\Request\OauthTokenRequest.cs" />