Skip to content

Commit d73f62d

Browse files
author
amaidniazi
committed
Code cleanup
1 parent 6b01a70 commit d73f62d

File tree

4 files changed

+13
-32
lines changed

4 files changed

+13
-32
lines changed

src/CoreApi/FilestoreApi.cs

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,37 @@
88
using System.Text;
99
using System.Threading;
1010
using System.Threading.Tasks;
11-
using static Ipfs.Http.CoreApi.FilestoreApi;
1211

13-
namespace Ipfs.Http.CoreApi
12+
namespace Ipfs.Http
1413
{
15-
/// <summary>
16-
/// Concrete implementation of <see cref="IFilestoreApi"/>.
17-
/// </summary>
14+
/// <inheritdoc/>
1815
public class FilestoreApi : IFilestoreApi
1916
{
2017
private IpfsClient ipfs;
2118

19+
/// <inheritdoc/>
2220
internal FilestoreApi(IpfsClient ipfs)
2321
{
2422
this.ipfs = ipfs;
2523
}
2624

27-
/// <summary>
28-
/// List async api for <see cref="IFilestoreApi"/>.
29-
/// </summary>
30-
/// <param name="cid"></param>
31-
/// <param name="token"></param>
32-
/// <param name="fileOrder"></param>
33-
/// <returns></returns>
34-
public async Task<IFilesStoreApiObjectResponse> ListAsync(string cid, CancellationToken token, bool fileOrder)
25+
/// <inheritdoc/>
26+
public async Task<IFilestoreApiObjectResponse> ListAsync(string cid, bool fileOrder, CancellationToken token)
3527
{
3628
var json = await ipfs.DoCommandAsync("filestore/ls", token, cid, fileOrder.ToString());
3729

3830
return JsonConvert.DeserializeObject<FilestoreObjectResponse>(json);
3931
}
4032

41-
/// <summary>
42-
/// Object verification api for <see cref="IFilestoreApi"/>.
43-
/// </summary>
44-
/// <param name="cid"></param>
45-
/// <param name="fileOrder"></param>
46-
/// <param name="token"></param>
47-
/// <returns></returns>
48-
public async Task<IFilesStoreApiObjectResponse> VerifyObjectsAsync(string cid, bool fileOrder, CancellationToken token)
33+
/// <inheritdoc/>
34+
public async Task<IFilestoreApiObjectResponse> VerifyObjectsAsync(string cid, bool fileOrder, CancellationToken token)
4935
{
5036
var json = await ipfs.DoCommandAsync("filestore/verify", token, cid, fileOrder.ToString());
5137

5238
return JsonConvert.DeserializeObject<FilestoreObjectResponse>(json);
5339
}
5440

55-
/// <summary>
56-
/// Executes Dups command in <see cref="IFilestoreApi"/>.
57-
/// </summary>
58-
/// <param name="token"></param>
59-
/// <returns></returns>
41+
/// <inheritdoc/>
6042
public async Task<IDupsResponse> DupsAsync(CancellationToken token)
6143
{
6244
var json = await ipfs.DoCommandAsync("filestore/dups", token);

src/CoreApi/Key.cs renamed to src/CoreApi/FilestoreKey.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using Ipfs.CoreApi;
22
using Newtonsoft.Json;
33

4-
namespace Ipfs.Http.CoreApi
4+
namespace Ipfs.Http
55
{
66
/// <summary>
77
/// Model for the hold filestore key
88
/// </summary>
9-
public class Key : IFilesStoreKey
9+
public class FilestoreKey : IFilesStoreKey
1010
{
1111
/// <summary>
1212
/// Key value.

src/CoreApi/FilestoreObjectResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using Ipfs.CoreApi;
22

3-
namespace Ipfs.Http.CoreApi
3+
namespace Ipfs.Http
44
{
55
/// <summary>
66
/// Model holding response to <see cref="IFilestoreApi"/>.
77
/// </summary>
8-
public class FilestoreObjectResponse : IFilesStoreApiObjectResponse
8+
public class FilestoreObjectResponse : IFilestoreApiObjectResponse
99
{
1010
/// <summary>
1111
/// Holds any error message.
@@ -21,7 +21,7 @@ public class FilestoreObjectResponse : IFilesStoreApiObjectResponse
2121
/// The key to the Filestore.
2222
/// </summary>
2323

24-
public Key Key { get; set; }
24+
public FilestoreKey Key { get; set; }
2525

2626
/// <summary>
2727
/// The response offset.

src/IpfsClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Ipfs.CoreApi;
2-
using Ipfs.Http.CoreApi;
32
using Newtonsoft.Json;
43
using System;
54
using System.Collections.Generic;

0 commit comments

Comments
 (0)